{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:05:46, Iteration: 1000, Train Loss: 1.7100e+01, c1: 2.1630e-01, c2: 3.9866e-01, d1: 1.6476e-01, d2: 9.3972e-03, l1_reg: 3.1940e+02, l2_reg: 4.6382e+01\n",
      "2020/09/10, 18:05:59, Iteration: 2000, Train Loss: 1.6775e+01, c1: 2.0822e-01, c2: 6.0435e-01, d1: 1.5951e-01, d2: 1.1115e-02, l1_reg: 3.2325e+02, l2_reg: 4.7833e+01\n",
      "2020/09/10, 18:06:11, Iteration: 3000, Train Loss: 1.7208e+01, c1: 1.8845e-01, c2: 6.0492e-01, d1: 1.6405e-01, d2: 1.0524e-02, l1_reg: 3.2624e+02, l2_reg: 4.8988e+01\n",
      "2020/09/10, 18:06:24, Iteration: 4000, Train Loss: 6.9689e+00, c1: 2.4325e-01, c2: 6.3931e-01, d1: 6.0732e-02, d2: 1.3208e-02, l1_reg: 3.3962e+02, l2_reg: 5.4361e+01\n",
      "2020/09/10, 18:06:37, Iteration: 5000, Train Loss: 4.5501e+00, c1: 2.5096e-01, c2: 6.8328e-01, d1: 3.6013e-02, d2: 1.4525e-02, l1_reg: 3.4653e+02, l2_reg: 5.7139e+01\n",
      "2020/09/10, 18:06:50, Iteration: 6000, Train Loss: 3.9549e+00, c1: 2.4782e-01, c2: 6.8222e-01, d1: 3.0046e-02, d2: 2.0254e-02, l1_reg: 3.5080e+02, l2_reg: 5.8867e+01\n",
      "2020/09/10, 18:07:02, Iteration: 7000, Train Loss: 2.8369e+00, c1: 2.3945e-01, c2: 6.6204e-01, d1: 1.9130e-02, d2: 2.2376e-02, l1_reg: 3.5483e+02, l2_reg: 6.0493e+01\n",
      "2020/09/10, 18:07:15, Iteration: 8000, Train Loss: 2.4027e+00, c1: 2.4259e-01, c2: 6.4163e-01, d1: 1.4840e-02, d2: 3.4509e-02, l1_reg: 3.5839e+02, l2_reg: 6.1937e+01\n",
      "2020/09/10, 18:07:28, Iteration: 9000, Train Loss: 2.5162e+00, c1: 2.4351e-01, c2: 6.1525e-01, d1: 1.6174e-02, d2: 4.0001e-02, l1_reg: 3.6066e+02, l2_reg: 6.2909e+01\n",
      "2020/09/10, 18:07:41, Iteration: 10000, Train Loss: 2.3382e+00, c1: 2.4078e-01, c2: 5.8482e-01, d1: 1.4670e-02, d2: 4.5563e-02, l1_reg: 3.6240e+02, l2_reg: 6.3695e+01\n",
      "2020/09/10, 18:07:53, Iteration: 11000, Train Loss: 1.7991e+00, c1: 2.3771e-01, c2: 5.5498e-01, d1: 9.6778e-03, d2: 3.8599e-02, l1_reg: 3.6403e+02, l2_reg: 6.4463e+01\n",
      "2020/09/10, 18:08:06, Iteration: 12000, Train Loss: 1.7837e+00, c1: 2.3237e-01, c2: 5.2078e-01, d1: 9.8047e-03, d2: 5.0053e-02, l1_reg: 3.6572e+02, l2_reg: 6.5301e+01\n",
      "2020/09/10, 18:08:19, Iteration: 13000, Train Loss: 1.6414e+00, c1: 2.2952e-01, c2: 4.8321e-01, d1: 8.7273e-03, d2: 5.5951e-02, l1_reg: 3.6751e+02, l2_reg: 6.6187e+01\n",
      "2020/09/10, 18:08:32, Iteration: 14000, Train Loss: 1.4575e+00, c1: 2.2878e-01, c2: 4.6354e-01, d1: 7.1848e-03, d2: 4.6658e-02, l1_reg: 3.6933e+02, l2_reg: 6.7064e+01\n",
      "2020/09/10, 18:08:44, Iteration: 15000, Train Loss: 1.2050e+00, c1: 2.2390e-01, c2: 4.2908e-01, d1: 5.1024e-03, d2: 4.1819e-02, l1_reg: 3.7099e+02, l2_reg: 6.7890e+01\n",
      "2020/09/10, 18:08:57, Iteration: 16000, Train Loss: 1.1811e+00, c1: 2.2132e-01, c2: 4.0823e-01, d1: 5.1233e-03, d2: 3.9269e-02, l1_reg: 3.7245e+02, l2_reg: 6.8637e+01\n",
      "2020/09/10, 18:09:10, Iteration: 17000, Train Loss: 1.0416e+00, c1: 2.1850e-01, c2: 3.8686e-01, d1: 4.0366e-03, d2: 3.2586e-02, l1_reg: 3.7366e+02, l2_reg: 6.9250e+01\n",
      "2020/09/10, 18:09:22, Iteration: 18000, Train Loss: 9.9003e-01, c1: 2.1584e-01, c2: 3.8468e-01, d1: 3.6687e-03, d2: 2.2641e-02, l1_reg: 3.7466e+02, l2_reg: 6.9763e+01\n",
      "2020/09/10, 18:09:35, Iteration: 19000, Train Loss: 9.2949e-01, c1: 2.1545e-01, c2: 3.8063e-01, d1: 3.1425e-03, d2: 1.9163e-02, l1_reg: 3.7537e+02, l2_reg: 7.0141e+01\n",
      "2020/09/10, 18:09:48, Iteration: 20000, Train Loss: 9.5792e-01, c1: 2.1020e-01, c2: 3.6955e-01, d1: 3.6105e-03, d2: 1.7121e-02, l1_reg: 3.7583e+02, l2_reg: 7.0398e+01\n"
     ]
    }
   ],
   "source": [
    "import jax\n",
    "import jax.numpy as jnp\n",
    "from jax import random\n",
    "\n",
    "import os, sys\n",
    "sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(\"./\"))))\n",
    "\n",
    "from jaxmeta.model_init import init_siren_params\n",
    "\n",
    "from training import Agent\n",
    "from loss import model, loss_fn, evaluate_fn\n",
    "from data import generate_dataset, generate_batch_fn\n",
    "import config\n",
    "\n",
    "config.n_data = {\n",
    "\t\"i\": 100,\n",
    "\t\"cx\": 201, \n",
    "\t\"ct\": 1001,\n",
    "\t\"quad\": 16,\n",
    "}\n",
    "config.batch_size = {\n",
    "\t\"dirichlet\": 100,\n",
    "\t\"collocation\": 20000,\n",
    "}\n",
    "config.weights = {\n",
    "\t\"c1\": 1.0,\n",
    "\t\"c2\": 1.0,\n",
    "\t\"d1\": 100.0,\n",
    "\t\"d2\": 1.0,\n",
    "\t\"l1\": 1e-8,\n",
    "\t\"l2\": 1e-8,\n",
    "}\n",
    "config.iterations = 20000\n",
    "config.print_every = 1000\n",
    "config.save_every = 100000\n",
    "config.lr = 1e-4\n",
    "\n",
    "key, *subkeys = random.split(config.key, 3)\n",
    "params = init_siren_params(subkeys[0], config.layers, config.c0, config.w0)\n",
    "\n",
    "datasets = generate_dataset(config.n_data[\"i\"], config.n_data[\"cx\"], config.n_data[\"ct\"], config.n_data[\"quad\"])\n",
    "batch_fn, evaluate_batch_fn = generate_batch_fn(subkeys[1], config.batch_size, *datasets, config.weights)\n",
    "\n",
    "agent = Agent(params, loss_fn, evaluate_fn, \"models/{}\".format(config.NAME))\n",
    "agent.compile(config.optimizer, config.lr)\n",
    "agent.train(config.iterations, batch_fn, evaluate_batch_fn, config.print_every, config.save_every, config.loss_names, config.log_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:11:18, Iteration: 21000, Train Loss: 8.2634e-01, c1: 2.0892e-01, c2: 3.6913e-01, d1: 2.3539e-03, d2: 1.2889e-02, l1_reg: 3.7614e+02, l2_reg: 7.0584e+01\n",
      "2020/09/10, 18:11:30, Iteration: 22000, Train Loss: 8.1312e-01, c1: 2.0851e-01, c2: 3.6588e-01, d1: 2.2730e-03, d2: 1.1426e-02, l1_reg: 3.7636e+02, l2_reg: 7.0728e+01\n",
      "2020/09/10, 18:11:44, Iteration: 23000, Train Loss: 8.0379e-01, c1: 2.0706e-01, c2: 3.6529e-01, d1: 2.2171e-03, d2: 9.7314e-03, l1_reg: 3.7658e+02, l2_reg: 7.0851e+01\n",
      "2020/09/10, 18:11:57, Iteration: 24000, Train Loss: 7.4774e-01, c1: 2.0257e-01, c2: 3.5495e-01, d1: 1.8142e-03, d2: 8.8008e-03, l1_reg: 3.7679e+02, l2_reg: 7.0964e+01\n",
      "2020/09/10, 18:12:10, Iteration: 25000, Train Loss: 8.2918e-01, c1: 2.0333e-01, c2: 3.5764e-01, d1: 2.5930e-03, d2: 8.9149e-03, l1_reg: 3.7695e+02, l2_reg: 7.1056e+01\n",
      "2020/09/10, 18:12:22, Iteration: 26000, Train Loss: 8.2134e-01, c1: 2.0163e-01, c2: 3.5901e-01, d1: 2.5246e-03, d2: 8.2314e-03, l1_reg: 3.7710e+02, l2_reg: 7.1130e+01\n",
      "2020/09/10, 18:12:35, Iteration: 27000, Train Loss: 7.3577e-01, c1: 2.0128e-01, c2: 3.5780e-01, d1: 1.6846e-03, d2: 8.2261e-03, l1_reg: 3.7728e+02, l2_reg: 7.1211e+01\n",
      "2020/09/10, 18:12:47, Iteration: 28000, Train Loss: 7.3238e-01, c1: 1.9748e-01, c2: 3.4501e-01, d1: 1.8256e-03, d2: 7.3255e-03, l1_reg: 3.7743e+02, l2_reg: 7.1279e+01\n",
      "2020/09/10, 18:13:00, Iteration: 29000, Train Loss: 7.3527e-01, c1: 1.9854e-01, c2: 3.4597e-01, d1: 1.8443e-03, d2: 6.3314e-03, l1_reg: 3.7758e+02, l2_reg: 7.1340e+01\n",
      "2020/09/10, 18:13:13, Iteration: 30000, Train Loss: 6.9075e-01, c1: 1.9599e-01, c2: 3.4175e-01, d1: 1.4684e-03, d2: 6.1683e-03, l1_reg: 3.7773e+02, l2_reg: 7.1401e+01\n",
      "2020/09/10, 18:13:26, Iteration: 31000, Train Loss: 6.6585e-01, c1: 1.9416e-01, c2: 3.4179e-01, d1: 1.2339e-03, d2: 6.5117e-03, l1_reg: 3.7787e+02, l2_reg: 7.1454e+01\n",
      "2020/09/10, 18:13:38, Iteration: 32000, Train Loss: 6.9499e-01, c1: 1.9218e-01, c2: 3.3774e-01, d1: 1.5919e-03, d2: 5.8714e-03, l1_reg: 3.7801e+02, l2_reg: 7.1509e+01\n",
      "2020/09/10, 18:13:51, Iteration: 33000, Train Loss: 7.0067e-01, c1: 1.9233e-01, c2: 3.4405e-01, d1: 1.5767e-03, d2: 6.6219e-03, l1_reg: 3.7814e+02, l2_reg: 7.1558e+01\n",
      "2020/09/10, 18:14:04, Iteration: 34000, Train Loss: 6.7789e-01, c1: 1.9124e-01, c2: 3.3711e-01, d1: 1.4215e-03, d2: 7.3761e-03, l1_reg: 3.7828e+02, l2_reg: 7.1614e+01\n",
      "2020/09/10, 18:14:16, Iteration: 35000, Train Loss: 7.3016e-01, c1: 1.9161e-01, c2: 3.3262e-01, d1: 1.9924e-03, d2: 6.6892e-03, l1_reg: 3.7842e+02, l2_reg: 7.1670e+01\n",
      "2020/09/10, 18:14:29, Iteration: 36000, Train Loss: 6.8397e-01, c1: 1.8662e-01, c2: 3.2677e-01, d1: 1.6493e-03, d2: 5.6300e-03, l1_reg: 3.7855e+02, l2_reg: 7.1722e+01\n",
      "2020/09/10, 18:14:42, Iteration: 37000, Train Loss: 6.9656e-01, c1: 1.8676e-01, c2: 3.2185e-01, d1: 1.8261e-03, d2: 5.3315e-03, l1_reg: 3.7866e+02, l2_reg: 7.1768e+01\n",
      "2020/09/10, 18:14:55, Iteration: 38000, Train Loss: 6.5052e-01, c1: 1.8323e-01, c2: 3.1535e-01, d1: 1.4665e-03, d2: 5.2838e-03, l1_reg: 3.7878e+02, l2_reg: 7.1820e+01\n",
      "2020/09/10, 18:15:07, Iteration: 39000, Train Loss: 7.4035e-01, c1: 1.8659e-01, c2: 3.1535e-01, d1: 2.3327e-03, d2: 5.1343e-03, l1_reg: 3.7891e+02, l2_reg: 7.1879e+01\n",
      "2020/09/10, 18:15:20, Iteration: 40000, Train Loss: 6.1789e-01, c1: 1.8576e-01, c2: 3.2026e-01, d1: 1.0714e-03, d2: 4.7377e-03, l1_reg: 3.7903e+02, l2_reg: 7.1932e+01\n"
     ]
    }
   ],
   "source": [
    "agent.train(config.iterations, batch_fn, evaluate_batch_fn, config.print_every, config.save_every, config.loss_names, config.log_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:36:47, Iteration: 41000, Train Loss: 6.4290e-01, c1: 1.8448e-01, c2: 3.1602e-01, d1: 1.3797e-03, d2: 4.4193e-03, l1_reg: 3.7916e+02, l2_reg: 7.1991e+01\n",
      "2020/09/10, 18:37:00, Iteration: 42000, Train Loss: 6.7764e-01, c1: 1.8287e-01, c2: 3.1333e-01, d1: 1.7677e-03, d2: 4.6582e-03, l1_reg: 3.7929e+02, l2_reg: 7.2047e+01\n",
      "2020/09/10, 18:37:12, Iteration: 43000, Train Loss: 6.2695e-01, c1: 1.8166e-01, c2: 3.0867e-01, d1: 1.3248e-03, d2: 4.1421e-03, l1_reg: 3.7942e+02, l2_reg: 7.2106e+01\n",
      "2020/09/10, 18:37:25, Iteration: 44000, Train Loss: 6.0016e-01, c1: 1.7911e-01, c2: 3.0903e-01, d1: 1.0744e-03, d2: 4.5764e-03, l1_reg: 3.7955e+02, l2_reg: 7.2168e+01\n",
      "2020/09/10, 18:37:38, Iteration: 45000, Train Loss: 6.2694e-01, c1: 1.8214e-01, c2: 3.0931e-01, d1: 1.3129e-03, d2: 4.2027e-03, l1_reg: 3.7968e+02, l2_reg: 7.2228e+01\n",
      "2020/09/10, 18:37:50, Iteration: 46000, Train Loss: 6.5336e-01, c1: 1.7959e-01, c2: 3.1216e-01, d1: 1.5761e-03, d2: 3.9945e-03, l1_reg: 3.7982e+02, l2_reg: 7.2295e+01\n",
      "2020/09/10, 18:38:03, Iteration: 47000, Train Loss: 6.0926e-01, c1: 1.8097e-01, c2: 3.0400e-01, d1: 1.2053e-03, d2: 3.7566e-03, l1_reg: 3.7995e+02, l2_reg: 7.2359e+01\n",
      "2020/09/10, 18:38:15, Iteration: 48000, Train Loss: 5.8972e-01, c1: 1.7775e-01, c2: 2.9926e-01, d1: 1.0885e-03, d2: 3.8557e-03, l1_reg: 3.8008e+02, l2_reg: 7.2423e+01\n",
      "2020/09/10, 18:38:28, Iteration: 49000, Train Loss: 5.9258e-01, c1: 1.7571e-01, c2: 2.9468e-01, d1: 1.1885e-03, d2: 3.3309e-03, l1_reg: 3.8021e+02, l2_reg: 7.2488e+01\n",
      "2020/09/10, 18:38:41, Iteration: 50000, Train Loss: 5.9507e-01, c1: 1.7595e-01, c2: 2.9118e-01, d1: 1.2511e-03, d2: 2.8219e-03, l1_reg: 3.8034e+02, l2_reg: 7.2553e+01\n",
      "2020/09/10, 18:38:53, Iteration: 51000, Train Loss: 5.6880e-01, c1: 1.7626e-01, c2: 2.9278e-01, d1: 9.7171e-04, d2: 2.5882e-03, l1_reg: 3.8046e+02, l2_reg: 7.2618e+01\n",
      "2020/09/10, 18:39:06, Iteration: 52000, Train Loss: 6.0584e-01, c1: 1.7387e-01, c2: 2.9397e-01, d1: 1.3494e-03, d2: 3.0632e-03, l1_reg: 3.8058e+02, l2_reg: 7.2682e+01\n",
      "2020/09/10, 18:39:19, Iteration: 53000, Train Loss: 5.7650e-01, c1: 1.7602e-01, c2: 2.9730e-01, d1: 1.0048e-03, d2: 2.7018e-03, l1_reg: 3.8069e+02, l2_reg: 7.2742e+01\n",
      "2020/09/10, 18:39:31, Iteration: 54000, Train Loss: 6.1956e-01, c1: 1.7411e-01, c2: 2.8637e-01, d1: 1.5645e-03, d2: 2.6366e-03, l1_reg: 3.8081e+02, l2_reg: 7.2801e+01\n",
      "2020/09/10, 18:39:44, Iteration: 55000, Train Loss: 5.9585e-01, c1: 1.7298e-01, c2: 2.9090e-01, d1: 1.2983e-03, d2: 2.1396e-03, l1_reg: 3.8092e+02, l2_reg: 7.2859e+01\n",
      "2020/09/10, 18:39:57, Iteration: 56000, Train Loss: 5.5730e-01, c1: 1.7323e-01, c2: 2.8055e-01, d1: 1.0152e-03, d2: 1.9952e-03, l1_reg: 3.8104e+02, l2_reg: 7.2919e+01\n",
      "2020/09/10, 18:40:10, Iteration: 57000, Train Loss: 6.0703e-01, c1: 1.7093e-01, c2: 2.7665e-01, d1: 1.5750e-03, d2: 1.9421e-03, l1_reg: 3.8115e+02, l2_reg: 7.2975e+01\n",
      "2020/09/10, 18:40:23, Iteration: 58000, Train Loss: 5.3489e-01, c1: 1.7024e-01, c2: 2.7947e-01, d1: 8.2780e-04, d2: 2.3906e-03, l1_reg: 3.8126e+02, l2_reg: 7.3032e+01\n",
      "2020/09/10, 18:40:36, Iteration: 59000, Train Loss: 5.3683e-01, c1: 1.6976e-01, c2: 2.8048e-01, d1: 8.4156e-04, d2: 2.4300e-03, l1_reg: 3.8137e+02, l2_reg: 7.3085e+01\n",
      "2020/09/10, 18:40:48, Iteration: 60000, Train Loss: 5.5916e-01, c1: 1.6854e-01, c2: 2.7395e-01, d1: 1.1454e-03, d2: 2.1217e-03, l1_reg: 3.8148e+02, l2_reg: 7.3139e+01\n",
      "2020/09/10, 18:41:01, Iteration: 61000, Train Loss: 5.9332e-01, c1: 1.6812e-01, c2: 2.8074e-01, d1: 1.4273e-03, d2: 1.7172e-03, l1_reg: 3.8158e+02, l2_reg: 7.3189e+01\n",
      "2020/09/10, 18:41:14, Iteration: 62000, Train Loss: 5.3581e-01, c1: 1.6847e-01, c2: 2.7644e-01, d1: 8.9077e-04, d2: 1.8198e-03, l1_reg: 3.8169e+02, l2_reg: 7.3242e+01\n",
      "2020/09/10, 18:41:27, Iteration: 63000, Train Loss: 5.5343e-01, c1: 1.6606e-01, c2: 2.7095e-01, d1: 1.1441e-03, d2: 2.0132e-03, l1_reg: 3.8179e+02, l2_reg: 7.3297e+01\n",
      "2020/09/10, 18:41:40, Iteration: 64000, Train Loss: 5.4505e-01, c1: 1.6774e-01, c2: 2.7983e-01, d1: 9.5952e-04, d2: 1.5212e-03, l1_reg: 3.8189e+02, l2_reg: 7.3349e+01\n",
      "2020/09/10, 18:41:52, Iteration: 65000, Train Loss: 5.7056e-01, c1: 1.6654e-01, c2: 2.6993e-01, d1: 1.3225e-03, d2: 1.8421e-03, l1_reg: 3.8199e+02, l2_reg: 7.3397e+01\n",
      "2020/09/10, 18:42:05, Iteration: 66000, Train Loss: 5.1165e-01, c1: 1.6625e-01, c2: 2.6758e-01, d1: 7.6083e-04, d2: 1.7380e-03, l1_reg: 3.8209e+02, l2_reg: 7.3443e+01\n",
      "2020/09/10, 18:42:18, Iteration: 67000, Train Loss: 5.1674e-01, c1: 1.6659e-01, c2: 2.7511e-01, d1: 7.3270e-04, d2: 1.7666e-03, l1_reg: 3.8218e+02, l2_reg: 7.3489e+01\n",
      "2020/09/10, 18:42:31, Iteration: 68000, Train Loss: 5.3681e-01, c1: 1.6506e-01, c2: 2.7461e-01, d1: 9.5613e-04, d2: 1.5206e-03, l1_reg: 3.8229e+02, l2_reg: 7.3540e+01\n",
      "2020/09/10, 18:42:44, Iteration: 69000, Train Loss: 5.4304e-01, c1: 1.6544e-01, c2: 2.6980e-01, d1: 1.0551e-03, d2: 2.2805e-03, l1_reg: 3.8239e+02, l2_reg: 7.3588e+01\n",
      "2020/09/10, 18:42:56, Iteration: 70000, Train Loss: 5.5830e-01, c1: 1.6360e-01, c2: 2.6645e-01, d1: 1.2665e-03, d2: 1.6024e-03, l1_reg: 3.8248e+02, l2_reg: 7.3634e+01\n",
      "2020/09/10, 18:43:09, Iteration: 71000, Train Loss: 5.0640e-01, c1: 1.6511e-01, c2: 2.6366e-01, d1: 7.5839e-04, d2: 1.7837e-03, l1_reg: 3.8256e+02, l2_reg: 7.3677e+01\n",
      "2020/09/10, 18:43:22, Iteration: 72000, Train Loss: 5.0865e-01, c1: 1.6336e-01, c2: 2.6276e-01, d1: 8.1215e-04, d2: 1.3101e-03, l1_reg: 3.8265e+02, l2_reg: 7.3722e+01\n",
      "2020/09/10, 18:43:35, Iteration: 73000, Train Loss: 5.2188e-01, c1: 1.6256e-01, c2: 2.6594e-01, d1: 9.2015e-04, d2: 1.3576e-03, l1_reg: 3.8273e+02, l2_reg: 7.3763e+01\n",
      "2020/09/10, 18:43:48, Iteration: 74000, Train Loss: 4.9724e-01, c1: 1.6204e-01, c2: 2.6142e-01, d1: 7.2455e-04, d2: 1.3143e-03, l1_reg: 3.8281e+02, l2_reg: 7.3803e+01\n",
      "2020/09/10, 18:44:00, Iteration: 75000, Train Loss: 5.8861e-01, c1: 1.6184e-01, c2: 2.6491e-01, d1: 1.6042e-03, d2: 1.4397e-03, l1_reg: 3.8289e+02, l2_reg: 7.3843e+01\n",
      "2020/09/10, 18:44:13, Iteration: 76000, Train Loss: 5.0271e-01, c1: 1.5973e-01, c2: 2.5803e-01, d1: 8.3294e-04, d2: 1.6537e-03, l1_reg: 3.8298e+02, l2_reg: 7.3887e+01\n",
      "2020/09/10, 18:44:26, Iteration: 77000, Train Loss: 5.3168e-01, c1: 1.6160e-01, c2: 2.6215e-01, d1: 1.0621e-03, d2: 1.7107e-03, l1_reg: 3.8306e+02, l2_reg: 7.3928e+01\n",
      "2020/09/10, 18:44:39, Iteration: 78000, Train Loss: 5.3579e-01, c1: 1.6197e-01, c2: 2.5896e-01, d1: 1.1355e-03, d2: 1.3150e-03, l1_reg: 3.8314e+02, l2_reg: 7.3967e+01\n",
      "2020/09/10, 18:44:52, Iteration: 79000, Train Loss: 5.0212e-01, c1: 1.6095e-01, c2: 2.5881e-01, d1: 8.0988e-04, d2: 1.3727e-03, l1_reg: 3.8321e+02, l2_reg: 7.4002e+01\n",
      "2020/09/10, 18:45:04, Iteration: 80000, Train Loss: 5.2346e-01, c1: 1.5892e-01, c2: 2.5630e-01, d1: 1.0682e-03, d2: 1.4190e-03, l1_reg: 3.8329e+02, l2_reg: 7.4041e+01\n",
      "2020/09/10, 18:45:17, Iteration: 81000, Train Loss: 4.8507e-01, c1: 1.5913e-01, c2: 2.6265e-01, d1: 6.1808e-04, d2: 1.4832e-03, l1_reg: 3.8337e+02, l2_reg: 7.4082e+01\n",
      "2020/09/10, 18:45:30, Iteration: 82000, Train Loss: 4.8932e-01, c1: 1.5982e-01, c2: 2.5425e-01, d1: 7.3584e-04, d2: 1.6617e-03, l1_reg: 3.8345e+02, l2_reg: 7.4118e+01\n",
      "2020/09/10, 18:45:43, Iteration: 83000, Train Loss: 5.5167e-01, c1: 1.5689e-01, c2: 2.5327e-01, d1: 1.4009e-03, d2: 1.4220e-03, l1_reg: 3.8352e+02, l2_reg: 7.4152e+01\n",
      "2020/09/10, 18:45:56, Iteration: 84000, Train Loss: 4.8920e-01, c1: 1.5803e-01, c2: 2.5446e-01, d1: 7.5349e-04, d2: 1.3675e-03, l1_reg: 3.8358e+02, l2_reg: 7.4186e+01\n",
      "2020/09/10, 18:46:08, Iteration: 85000, Train Loss: 4.9421e-01, c1: 1.5742e-01, c2: 2.5644e-01, d1: 7.9007e-04, d2: 1.3378e-03, l1_reg: 3.8366e+02, l2_reg: 7.4223e+01\n",
      "2020/09/10, 18:46:21, Iteration: 86000, Train Loss: 4.8022e-01, c1: 1.5711e-01, c2: 2.5135e-01, d1: 7.0537e-04, d2: 1.2212e-03, l1_reg: 3.8373e+02, l2_reg: 7.4256e+01\n",
      "2020/09/10, 18:46:34, Iteration: 87000, Train Loss: 5.4214e-01, c1: 1.5686e-01, c2: 2.5384e-01, d1: 1.3017e-03, d2: 1.2643e-03, l1_reg: 3.8379e+02, l2_reg: 7.4286e+01\n",
      "2020/09/10, 18:46:47, Iteration: 88000, Train Loss: 5.0981e-01, c1: 1.5564e-01, c2: 2.5697e-01, d1: 9.6097e-04, d2: 1.1011e-03, l1_reg: 3.8386e+02, l2_reg: 7.4323e+01\n",
      "2020/09/10, 18:47:00, Iteration: 89000, Train Loss: 4.9902e-01, c1: 1.5458e-01, c2: 2.5258e-01, d1: 9.0354e-04, d2: 1.4950e-03, l1_reg: 3.8393e+02, l2_reg: 7.4357e+01\n",
      "2020/09/10, 18:47:12, Iteration: 90000, Train Loss: 4.8116e-01, c1: 1.5728e-01, c2: 2.6173e-01, d1: 6.0708e-04, d2: 1.4427e-03, l1_reg: 3.8400e+02, l2_reg: 7.4391e+01\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:47:25, Iteration: 91000, Train Loss: 5.1148e-01, c1: 1.5632e-01, c2: 2.5066e-01, d1: 1.0285e-03, d2: 1.6462e-03, l1_reg: 3.8406e+02, l2_reg: 7.4424e+01\n",
      "2020/09/10, 18:47:38, Iteration: 92000, Train Loss: 5.2361e-01, c1: 1.5772e-01, c2: 2.5544e-01, d1: 1.0905e-03, d2: 1.3935e-03, l1_reg: 3.8413e+02, l2_reg: 7.4455e+01\n",
      "2020/09/10, 18:47:51, Iteration: 93000, Train Loss: 4.9345e-01, c1: 1.5630e-01, c2: 2.4821e-01, d1: 8.7595e-04, d2: 1.3444e-03, l1_reg: 3.8420e+02, l2_reg: 7.4486e+01\n",
      "2020/09/10, 18:48:04, Iteration: 94000, Train Loss: 5.0218e-01, c1: 1.5470e-01, c2: 2.4738e-01, d1: 9.8751e-04, d2: 1.3406e-03, l1_reg: 3.8427e+02, l2_reg: 7.4520e+01\n",
      "2020/09/10, 18:48:17, Iteration: 95000, Train Loss: 5.8422e-01, c1: 1.5330e-01, c2: 2.4796e-01, d1: 1.8147e-03, d2: 1.4934e-03, l1_reg: 3.8434e+02, l2_reg: 7.4553e+01\n",
      "2020/09/10, 18:48:30, Iteration: 96000, Train Loss: 4.9465e-01, c1: 1.5239e-01, c2: 2.5232e-01, d1: 8.8497e-04, d2: 1.4373e-03, l1_reg: 3.8439e+02, l2_reg: 7.4581e+01\n",
      "2020/09/10, 18:48:42, Iteration: 97000, Train Loss: 4.7079e-01, c1: 1.5319e-01, c2: 2.4481e-01, d1: 7.1640e-04, d2: 1.1401e-03, l1_reg: 3.8445e+02, l2_reg: 7.4609e+01\n",
      "2020/09/10, 18:48:55, Iteration: 98000, Train Loss: 4.7313e-01, c1: 1.5356e-01, c2: 2.4491e-01, d1: 7.3295e-04, d2: 1.3569e-03, l1_reg: 3.8452e+02, l2_reg: 7.4642e+01\n",
      "2020/09/10, 18:49:08, Iteration: 99000, Train Loss: 4.7407e-01, c1: 1.5271e-01, c2: 2.4083e-01, d1: 7.8935e-04, d2: 1.5826e-03, l1_reg: 3.8458e+02, l2_reg: 7.4671e+01\n",
      "2020/09/10, 18:49:21, Iteration: 100000, Train Loss: 4.7519e-01, c1: 1.5177e-01, c2: 2.4841e-01, d1: 7.3777e-04, d2: 1.2251e-03, l1_reg: 3.8465e+02, l2_reg: 7.4706e+01\n",
      "2020/09/10, 18:49:34, Iteration: 101000, Train Loss: 4.5649e-01, c1: 1.5189e-01, c2: 2.4148e-01, d1: 6.1950e-04, d2: 1.1621e-03, l1_reg: 3.8471e+02, l2_reg: 7.4736e+01\n",
      "2020/09/10, 18:49:46, Iteration: 102000, Train Loss: 4.9841e-01, c1: 1.5217e-01, c2: 2.4551e-01, d1: 9.9674e-04, d2: 1.0584e-03, l1_reg: 3.8477e+02, l2_reg: 7.4765e+01\n",
      "2020/09/10, 18:49:59, Iteration: 103000, Train Loss: 5.2687e-01, c1: 1.4898e-01, c2: 2.3692e-01, d1: 1.3961e-03, d2: 1.3504e-03, l1_reg: 3.8483e+02, l2_reg: 7.4796e+01\n",
      "2020/09/10, 18:50:12, Iteration: 104000, Train Loss: 4.9527e-01, c1: 1.5044e-01, c2: 2.4266e-01, d1: 1.0091e-03, d2: 1.2602e-03, l1_reg: 3.8489e+02, l2_reg: 7.4824e+01\n",
      "2020/09/10, 18:50:25, Iteration: 105000, Train Loss: 4.8564e-01, c1: 1.5032e-01, c2: 2.4228e-01, d1: 9.1727e-04, d2: 1.3117e-03, l1_reg: 3.8494e+02, l2_reg: 7.4852e+01\n",
      "2020/09/10, 18:50:38, Iteration: 106000, Train Loss: 4.7240e-01, c1: 1.4894e-01, c2: 2.3934e-01, d1: 8.3007e-04, d2: 1.1120e-03, l1_reg: 3.8500e+02, l2_reg: 7.4882e+01\n",
      "2020/09/10, 18:50:50, Iteration: 107000, Train Loss: 4.7454e-01, c1: 1.4909e-01, c2: 2.3945e-01, d1: 8.4573e-04, d2: 1.4292e-03, l1_reg: 3.8506e+02, l2_reg: 7.4913e+01\n",
      "2020/09/10, 18:51:03, Iteration: 108000, Train Loss: 4.4904e-01, c1: 1.4880e-01, c2: 2.4120e-01, d1: 5.8192e-04, d2: 8.4170e-04, l1_reg: 3.8511e+02, l2_reg: 7.4938e+01\n",
      "2020/09/10, 18:51:16, Iteration: 109000, Train Loss: 4.5129e-01, c1: 1.4804e-01, c2: 2.3427e-01, d1: 6.7961e-04, d2: 1.0086e-03, l1_reg: 3.8517e+02, l2_reg: 7.4966e+01\n",
      "2020/09/10, 18:51:29, Iteration: 110000, Train Loss: 4.5486e-01, c1: 1.4602e-01, c2: 2.3628e-01, d1: 7.1296e-04, d2: 1.2641e-03, l1_reg: 3.8523e+02, l2_reg: 7.4996e+01\n",
      "2020/09/10, 18:51:42, Iteration: 111000, Train Loss: 4.7404e-01, c1: 1.4840e-01, c2: 2.4073e-01, d1: 8.3844e-04, d2: 1.0672e-03, l1_reg: 3.8529e+02, l2_reg: 7.5028e+01\n",
      "2020/09/10, 18:51:54, Iteration: 112000, Train Loss: 4.5197e-01, c1: 1.4691e-01, c2: 2.3485e-01, d1: 6.9146e-04, d2: 1.0542e-03, l1_reg: 3.8533e+02, l2_reg: 7.5047e+01\n",
      "2020/09/10, 18:52:07, Iteration: 113000, Train Loss: 4.8283e-01, c1: 1.4524e-01, c2: 2.3957e-01, d1: 9.6702e-04, d2: 1.3134e-03, l1_reg: 3.8538e+02, l2_reg: 7.5078e+01\n",
      "2020/09/10, 18:52:20, Iteration: 114000, Train Loss: 4.4917e-01, c1: 1.4544e-01, c2: 2.3403e-01, d1: 6.8567e-04, d2: 1.1305e-03, l1_reg: 3.8544e+02, l2_reg: 7.5107e+01\n",
      "2020/09/10, 18:52:33, Iteration: 115000, Train Loss: 4.7329e-01, c1: 1.4700e-01, c2: 2.3966e-01, d1: 8.5384e-04, d2: 1.2339e-03, l1_reg: 3.8549e+02, l2_reg: 7.5135e+01\n",
      "2020/09/10, 18:52:46, Iteration: 116000, Train Loss: 4.9078e-01, c1: 1.4450e-01, c2: 2.3863e-01, d1: 1.0679e-03, d2: 8.5549e-04, l1_reg: 3.8554e+02, l2_reg: 7.5160e+01\n",
      "2020/09/10, 18:52:58, Iteration: 117000, Train Loss: 4.6839e-01, c1: 1.4539e-01, c2: 2.3628e-01, d1: 8.5574e-04, d2: 1.1388e-03, l1_reg: 3.8560e+02, l2_reg: 7.5190e+01\n",
      "2020/09/10, 18:53:11, Iteration: 118000, Train Loss: 4.3537e-01, c1: 1.4435e-01, c2: 2.3724e-01, d1: 5.2737e-04, d2: 1.0331e-03, l1_reg: 3.8565e+02, l2_reg: 7.5217e+01\n",
      "2020/09/10, 18:53:24, Iteration: 119000, Train Loss: 4.5217e-01, c1: 1.4521e-01, c2: 2.3164e-01, d1: 7.4101e-04, d2: 1.2074e-03, l1_reg: 3.8569e+02, l2_reg: 7.5242e+01\n",
      "2020/09/10, 18:53:37, Iteration: 120000, Train Loss: 4.4327e-01, c1: 1.4529e-01, c2: 2.3445e-01, d1: 6.2430e-04, d2: 1.0835e-03, l1_reg: 3.8574e+02, l2_reg: 7.5270e+01\n",
      "2020/09/10, 18:53:49, Iteration: 121000, Train Loss: 4.5982e-01, c1: 1.4511e-01, c2: 2.4157e-01, d1: 7.2294e-04, d2: 8.3910e-04, l1_reg: 3.8580e+02, l2_reg: 7.5301e+01\n",
      "2020/09/10, 18:54:02, Iteration: 122000, Train Loss: 4.4060e-01, c1: 1.4321e-01, c2: 2.2801e-01, d1: 6.8451e-04, d2: 9.1726e-04, l1_reg: 3.8584e+02, l2_reg: 7.5324e+01\n",
      "2020/09/10, 18:54:15, Iteration: 123000, Train Loss: 4.2204e-01, c1: 1.4340e-01, c2: 2.3266e-01, d1: 4.5040e-04, d2: 9.3024e-04, l1_reg: 3.8590e+02, l2_reg: 7.5351e+01\n",
      "2020/09/10, 18:54:28, Iteration: 124000, Train Loss: 4.5534e-01, c1: 1.4392e-01, c2: 2.3298e-01, d1: 7.7469e-04, d2: 9.6984e-04, l1_reg: 3.8594e+02, l2_reg: 7.5375e+01\n",
      "2020/09/10, 18:54:40, Iteration: 125000, Train Loss: 4.7122e-01, c1: 1.4156e-01, c2: 2.3255e-01, d1: 9.6292e-04, d2: 8.1830e-04, l1_reg: 3.8598e+02, l2_reg: 7.5399e+01\n",
      "2020/09/10, 18:54:53, Iteration: 126000, Train Loss: 4.2688e-01, c1: 1.4105e-01, c2: 2.2765e-01, d1: 5.7368e-04, d2: 8.0766e-04, l1_reg: 3.8603e+02, l2_reg: 7.5425e+01\n",
      "2020/09/10, 18:55:06, Iteration: 127000, Train Loss: 4.4739e-01, c1: 1.4232e-01, c2: 2.2749e-01, d1: 7.6676e-04, d2: 8.9057e-04, l1_reg: 3.8608e+02, l2_reg: 7.5453e+01\n",
      "2020/09/10, 18:55:19, Iteration: 128000, Train Loss: 4.4951e-01, c1: 1.4335e-01, c2: 2.3169e-01, d1: 7.3589e-04, d2: 8.7720e-04, l1_reg: 3.8613e+02, l2_reg: 7.5479e+01\n",
      "2020/09/10, 18:55:32, Iteration: 129000, Train Loss: 4.1574e-01, c1: 1.4048e-01, c2: 2.2547e-01, d1: 4.8754e-04, d2: 1.0362e-03, l1_reg: 3.8617e+02, l2_reg: 7.5500e+01\n",
      "2020/09/10, 18:55:44, Iteration: 130000, Train Loss: 4.1726e-01, c1: 1.4269e-01, c2: 2.2855e-01, d1: 4.5185e-04, d2: 8.3340e-04, l1_reg: 3.8622e+02, l2_reg: 7.5527e+01\n",
      "2020/09/10, 18:55:57, Iteration: 131000, Train Loss: 4.5223e-01, c1: 1.3997e-01, c2: 2.2740e-01, d1: 8.3861e-04, d2: 9.9253e-04, l1_reg: 3.8627e+02, l2_reg: 7.5551e+01\n",
      "2020/09/10, 18:56:10, Iteration: 132000, Train Loss: 4.4794e-01, c1: 1.4014e-01, c2: 2.3234e-01, d1: 7.4350e-04, d2: 1.1067e-03, l1_reg: 3.8631e+02, l2_reg: 7.5576e+01\n",
      "2020/09/10, 18:56:23, Iteration: 133000, Train Loss: 4.7529e-01, c1: 1.3963e-01, c2: 2.2709e-01, d1: 1.0770e-03, d2: 8.6419e-04, l1_reg: 3.8636e+02, l2_reg: 7.5599e+01\n",
      "2020/09/10, 18:56:36, Iteration: 134000, Train Loss: 4.4849e-01, c1: 1.3741e-01, c2: 2.2086e-01, d1: 8.9320e-04, d2: 8.8884e-04, l1_reg: 3.8640e+02, l2_reg: 7.5623e+01\n",
      "2020/09/10, 18:56:48, Iteration: 135000, Train Loss: 5.3144e-01, c1: 1.3773e-01, c2: 2.1766e-01, d1: 1.7535e-03, d2: 6.8984e-04, l1_reg: 3.8645e+02, l2_reg: 7.5649e+01\n",
      "2020/09/10, 18:57:01, Iteration: 136000, Train Loss: 4.1893e-01, c1: 1.3909e-01, c2: 2.2626e-01, d1: 5.2725e-04, d2: 8.4287e-04, l1_reg: 3.8650e+02, l2_reg: 7.5674e+01\n",
      "2020/09/10, 18:57:14, Iteration: 137000, Train Loss: 4.5958e-01, c1: 1.3694e-01, c2: 2.2432e-01, d1: 9.7411e-04, d2: 9.1159e-04, l1_reg: 3.8654e+02, l2_reg: 7.5696e+01\n",
      "2020/09/10, 18:57:27, Iteration: 138000, Train Loss: 4.1950e-01, c1: 1.3649e-01, c2: 2.2219e-01, d1: 6.0063e-04, d2: 7.5283e-04, l1_reg: 3.8659e+02, l2_reg: 7.5723e+01\n",
      "2020/09/10, 18:57:40, Iteration: 139000, Train Loss: 4.1371e-01, c1: 1.3742e-01, c2: 2.2235e-01, d1: 5.2870e-04, d2: 1.0660e-03, l1_reg: 3.8663e+02, l2_reg: 7.5746e+01\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:57:53, Iteration: 140000, Train Loss: 4.5705e-01, c1: 1.4002e-01, c2: 2.2674e-01, d1: 8.9454e-04, d2: 8.3327e-04, l1_reg: 3.8667e+02, l2_reg: 7.5769e+01\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/lib/python3.8/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n",
      "  return array(a, dtype, copy=False, order=order)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 18:58:05, Iteration: 141000, Train Loss: 4.1117e-01, c1: 1.3670e-01, c2: 2.1911e-01, d1: 5.4418e-04, d2: 9.3496e-04, l1_reg: 3.8671e+02, l2_reg: 7.5792e+01\n",
      "2020/09/10, 18:58:18, Iteration: 142000, Train Loss: 4.2727e-01, c1: 1.3524e-01, c2: 2.2387e-01, d1: 6.7205e-04, d2: 9.4939e-04, l1_reg: 3.8675e+02, l2_reg: 7.5813e+01\n",
      "2020/09/10, 18:58:31, Iteration: 143000, Train Loss: 4.7525e-01, c1: 1.3640e-01, c2: 2.2196e-01, d1: 1.1581e-03, d2: 1.0777e-03, l1_reg: 3.8680e+02, l2_reg: 7.5836e+01\n",
      "2020/09/10, 18:58:44, Iteration: 144000, Train Loss: 4.1936e-01, c1: 1.3619e-01, c2: 2.1649e-01, d1: 6.6015e-04, d2: 6.6255e-04, l1_reg: 3.8684e+02, l2_reg: 7.5858e+01\n",
      "2020/09/10, 18:58:57, Iteration: 145000, Train Loss: 4.3925e-01, c1: 1.3487e-01, c2: 2.1988e-01, d1: 8.3746e-04, d2: 7.4960e-04, l1_reg: 3.8689e+02, l2_reg: 7.5883e+01\n",
      "2020/09/10, 18:59:10, Iteration: 146000, Train Loss: 4.2675e-01, c1: 1.3539e-01, c2: 2.1926e-01, d1: 7.1160e-04, d2: 9.3797e-04, l1_reg: 3.8693e+02, l2_reg: 7.5904e+01\n",
      "2020/09/10, 18:59:22, Iteration: 147000, Train Loss: 4.0928e-01, c1: 1.3583e-01, c2: 2.1319e-01, d1: 5.9662e-04, d2: 5.9242e-04, l1_reg: 3.8698e+02, l2_reg: 7.5926e+01\n",
      "2020/09/10, 18:59:35, Iteration: 148000, Train Loss: 4.0853e-01, c1: 1.3471e-01, c2: 2.1637e-01, d1: 5.6650e-04, d2: 7.9562e-04, l1_reg: 3.8702e+02, l2_reg: 7.5949e+01\n",
      "2020/09/10, 18:59:48, Iteration: 149000, Train Loss: 4.1049e-01, c1: 1.3409e-01, c2: 2.1333e-01, d1: 6.2185e-04, d2: 8.8198e-04, l1_reg: 3.8707e+02, l2_reg: 7.5972e+01\n",
      "2020/09/10, 19:00:01, Iteration: 150000, Train Loss: 4.5005e-01, c1: 1.3656e-01, c2: 2.1811e-01, d1: 9.4628e-04, d2: 7.4193e-04, l1_reg: 3.8712e+02, l2_reg: 7.5998e+01\n",
      "2020/09/10, 19:00:14, Iteration: 151000, Train Loss: 4.7561e-01, c1: 1.3493e-01, c2: 2.1584e-01, d1: 1.2400e-03, d2: 8.2660e-04, l1_reg: 3.8717e+02, l2_reg: 7.6021e+01\n",
      "2020/09/10, 19:00:26, Iteration: 152000, Train Loss: 4.6520e-01, c1: 1.3441e-01, c2: 2.1741e-01, d1: 1.1262e-03, d2: 7.6102e-04, l1_reg: 3.8721e+02, l2_reg: 7.6041e+01\n",
      "2020/09/10, 19:00:39, Iteration: 153000, Train Loss: 4.1927e-01, c1: 1.3579e-01, c2: 2.1649e-01, d1: 6.6361e-04, d2: 6.2544e-04, l1_reg: 3.8725e+02, l2_reg: 7.6061e+01\n",
      "2020/09/10, 19:00:52, Iteration: 154000, Train Loss: 4.0517e-01, c1: 1.3529e-01, c2: 2.1672e-01, d1: 5.2271e-04, d2: 8.7773e-04, l1_reg: 3.8730e+02, l2_reg: 7.6086e+01\n",
      "2020/09/10, 19:01:05, Iteration: 155000, Train Loss: 4.2402e-01, c1: 1.3295e-01, c2: 2.1826e-01, d1: 7.2137e-04, d2: 6.7399e-04, l1_reg: 3.8733e+02, l2_reg: 7.6105e+01\n",
      "2020/09/10, 19:01:18, Iteration: 156000, Train Loss: 4.7602e-01, c1: 1.3327e-01, c2: 2.1244e-01, d1: 1.2949e-03, d2: 8.0629e-04, l1_reg: 3.8738e+02, l2_reg: 7.6129e+01\n",
      "2020/09/10, 19:01:30, Iteration: 157000, Train Loss: 4.1912e-01, c1: 1.3279e-01, c2: 2.1209e-01, d1: 7.3287e-04, d2: 9.5484e-04, l1_reg: 3.8743e+02, l2_reg: 7.6154e+01\n",
      "2020/09/10, 19:01:43, Iteration: 158000, Train Loss: 4.2427e-01, c1: 1.3184e-01, c2: 2.1634e-01, d1: 7.5450e-04, d2: 6.3052e-04, l1_reg: 3.8747e+02, l2_reg: 7.6171e+01\n",
      "2020/09/10, 19:01:56, Iteration: 159000, Train Loss: 4.3032e-01, c1: 1.3315e-01, c2: 2.1701e-01, d1: 7.9473e-04, d2: 6.8680e-04, l1_reg: 3.8751e+02, l2_reg: 7.6194e+01\n",
      "2020/09/10, 19:02:09, Iteration: 160000, Train Loss: 4.4301e-01, c1: 1.3118e-01, c2: 2.1456e-01, d1: 9.6631e-04, d2: 6.2699e-04, l1_reg: 3.8756e+02, l2_reg: 7.6218e+01\n",
      "2020/09/10, 19:02:22, Iteration: 161000, Train Loss: 4.0525e-01, c1: 1.3437e-01, c2: 2.1349e-01, d1: 5.6629e-04, d2: 7.5993e-04, l1_reg: 3.8760e+02, l2_reg: 7.6240e+01\n",
      "2020/09/10, 19:02:35, Iteration: 162000, Train Loss: 4.0863e-01, c1: 1.3333e-01, c2: 2.1646e-01, d1: 5.8192e-04, d2: 6.4565e-04, l1_reg: 3.8764e+02, l2_reg: 7.6261e+01\n",
      "2020/09/10, 19:02:47, Iteration: 163000, Train Loss: 4.0810e-01, c1: 1.3083e-01, c2: 2.1262e-01, d1: 6.3898e-04, d2: 7.4951e-04, l1_reg: 3.8768e+02, l2_reg: 7.6283e+01\n",
      "2020/09/10, 19:03:00, Iteration: 164000, Train Loss: 3.9829e-01, c1: 1.3113e-01, c2: 2.1163e-01, d1: 5.4936e-04, d2: 5.9880e-04, l1_reg: 3.8772e+02, l2_reg: 7.6304e+01\n",
      "2020/09/10, 19:03:13, Iteration: 165000, Train Loss: 4.5503e-01, c1: 1.3037e-01, c2: 2.1016e-01, d1: 1.1385e-03, d2: 6.4903e-04, l1_reg: 3.8777e+02, l2_reg: 7.6327e+01\n",
      "2020/09/10, 19:03:26, Iteration: 166000, Train Loss: 4.3517e-01, c1: 1.3173e-01, c2: 2.1163e-01, d1: 9.1189e-04, d2: 6.1772e-04, l1_reg: 3.8781e+02, l2_reg: 7.6344e+01\n",
      "2020/09/10, 19:03:39, Iteration: 167000, Train Loss: 4.5845e-01, c1: 1.3142e-01, c2: 2.1352e-01, d1: 1.1282e-03, d2: 6.7722e-04, l1_reg: 3.8785e+02, l2_reg: 7.6365e+01\n",
      "2020/09/10, 19:03:51, Iteration: 168000, Train Loss: 4.2484e-01, c1: 1.2773e-01, c2: 2.0164e-01, d1: 9.4817e-04, d2: 6.4585e-04, l1_reg: 3.8789e+02, l2_reg: 7.6390e+01\n",
      "2020/09/10, 19:04:04, Iteration: 169000, Train Loss: 3.9874e-01, c1: 1.2970e-01, c2: 2.0616e-01, d1: 6.2119e-04, d2: 7.5115e-04, l1_reg: 3.8794e+02, l2_reg: 7.6412e+01\n",
      "2020/09/10, 19:04:17, Iteration: 170000, Train Loss: 4.1530e-01, c1: 1.2877e-01, c2: 2.0580e-01, d1: 8.0135e-04, d2: 5.7982e-04, l1_reg: 3.8798e+02, l2_reg: 7.6433e+01\n",
      "2020/09/10, 19:04:30, Iteration: 171000, Train Loss: 4.0772e-01, c1: 1.3070e-01, c2: 2.0939e-01, d1: 6.7061e-04, d2: 5.6483e-04, l1_reg: 3.8803e+02, l2_reg: 7.6458e+01\n",
      "2020/09/10, 19:04:43, Iteration: 172000, Train Loss: 4.2608e-01, c1: 1.2832e-01, c2: 2.0894e-01, d1: 8.8325e-04, d2: 4.8796e-04, l1_reg: 3.8806e+02, l2_reg: 7.6475e+01\n",
      "2020/09/10, 19:04:55, Iteration: 173000, Train Loss: 4.1632e-01, c1: 1.2880e-01, c2: 2.1084e-01, d1: 7.6156e-04, d2: 5.2486e-04, l1_reg: 3.8810e+02, l2_reg: 7.6496e+01\n",
      "2020/09/10, 19:05:08, Iteration: 174000, Train Loss: 3.7952e-01, c1: 1.2645e-01, c2: 2.0195e-01, d1: 5.0453e-04, d2: 6.5507e-04, l1_reg: 3.8815e+02, l2_reg: 7.6519e+01\n",
      "2020/09/10, 19:05:21, Iteration: 175000, Train Loss: 4.2458e-01, c1: 1.2809e-01, c2: 2.0771e-01, d1: 8.8203e-04, d2: 5.7264e-04, l1_reg: 3.8818e+02, l2_reg: 7.6538e+01\n",
      "2020/09/10, 19:05:34, Iteration: 176000, Train Loss: 4.1947e-01, c1: 1.2641e-01, c2: 2.0898e-01, d1: 8.3474e-04, d2: 6.0796e-04, l1_reg: 3.8823e+02, l2_reg: 7.6562e+01\n",
      "2020/09/10, 19:05:46, Iteration: 177000, Train Loss: 4.1177e-01, c1: 1.2803e-01, c2: 2.0629e-01, d1: 7.6636e-04, d2: 8.1371e-04, l1_reg: 3.8826e+02, l2_reg: 7.6579e+01\n",
      "2020/09/10, 19:05:59, Iteration: 178000, Train Loss: 4.0461e-01, c1: 1.2804e-01, c2: 2.0525e-01, d1: 7.0806e-04, d2: 5.1088e-04, l1_reg: 3.8830e+02, l2_reg: 7.6602e+01\n",
      "2020/09/10, 19:06:12, Iteration: 179000, Train Loss: 3.9407e-01, c1: 1.2745e-01, c2: 2.0290e-01, d1: 6.3164e-04, d2: 5.5561e-04, l1_reg: 3.8835e+02, l2_reg: 7.6623e+01\n",
      "2020/09/10, 19:06:25, Iteration: 180000, Train Loss: 4.3444e-01, c1: 1.2729e-01, c2: 2.0483e-01, d1: 1.0150e-03, d2: 8.1098e-04, l1_reg: 3.8839e+02, l2_reg: 7.6645e+01\n",
      "2020/09/10, 19:06:38, Iteration: 181000, Train Loss: 4.1726e-01, c1: 1.2617e-01, c2: 1.9864e-01, d1: 9.1872e-04, d2: 5.7934e-04, l1_reg: 3.8843e+02, l2_reg: 7.6666e+01\n",
      "2020/09/10, 19:06:50, Iteration: 182000, Train Loss: 4.5282e-01, c1: 1.2580e-01, c2: 2.0484e-01, d1: 1.2160e-03, d2: 5.7205e-04, l1_reg: 3.8847e+02, l2_reg: 7.6688e+01\n",
      "2020/09/10, 19:07:03, Iteration: 183000, Train Loss: 4.3444e-01, c1: 1.2498e-01, c2: 1.9418e-01, d1: 1.1454e-03, d2: 7.2592e-04, l1_reg: 3.8852e+02, l2_reg: 7.6712e+01\n",
      "2020/09/10, 19:07:16, Iteration: 184000, Train Loss: 4.2161e-01, c1: 1.2607e-01, c2: 2.0259e-01, d1: 9.2330e-04, d2: 6.2786e-04, l1_reg: 3.8856e+02, l2_reg: 7.6733e+01\n",
      "2020/09/10, 19:07:29, Iteration: 185000, Train Loss: 3.8248e-01, c1: 1.2558e-01, c2: 2.0149e-01, d1: 5.4858e-04, d2: 5.4419e-04, l1_reg: 3.8860e+02, l2_reg: 7.6754e+01\n",
      "2020/09/10, 19:07:41, Iteration: 186000, Train Loss: 3.6833e-01, c1: 1.2584e-01, c2: 2.0243e-01, d1: 3.9326e-04, d2: 7.2880e-04, l1_reg: 3.8864e+02, l2_reg: 7.6777e+01\n",
      "2020/09/10, 19:07:54, Iteration: 187000, Train Loss: 3.7325e-01, c1: 1.2515e-01, c2: 2.0123e-01, d1: 4.6319e-04, d2: 5.3683e-04, l1_reg: 3.8869e+02, l2_reg: 7.6799e+01\n",
      "2020/09/10, 19:08:07, Iteration: 188000, Train Loss: 4.7509e-01, c1: 1.2605e-01, c2: 2.0772e-01, d1: 1.4076e-03, d2: 5.5770e-04, l1_reg: 3.8873e+02, l2_reg: 7.6822e+01\n",
      "2020/09/10, 19:08:20, Iteration: 189000, Train Loss: 4.1052e-01, c1: 1.2341e-01, c2: 2.0102e-01, d1: 8.5367e-04, d2: 7.2170e-04, l1_reg: 3.8878e+02, l2_reg: 7.6844e+01\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:08:32, Iteration: 190000, Train Loss: 3.7925e-01, c1: 1.2345e-01, c2: 1.9668e-01, d1: 5.8559e-04, d2: 5.6025e-04, l1_reg: 3.8882e+02, l2_reg: 7.6868e+01\n",
      "2020/09/10, 19:08:45, Iteration: 191000, Train Loss: 3.9461e-01, c1: 1.2378e-01, c2: 1.9926e-01, d1: 7.0983e-04, d2: 5.8684e-04, l1_reg: 3.8886e+02, l2_reg: 7.6887e+01\n",
      "2020/09/10, 19:08:58, Iteration: 192000, Train Loss: 3.8838e-01, c1: 1.2309e-01, c2: 2.0324e-01, d1: 6.1485e-04, d2: 5.6258e-04, l1_reg: 3.8891e+02, l2_reg: 7.6911e+01\n",
      "2020/09/10, 19:09:11, Iteration: 193000, Train Loss: 4.4090e-01, c1: 1.2263e-01, c2: 1.9996e-01, d1: 1.1772e-03, d2: 5.8525e-04, l1_reg: 3.8895e+02, l2_reg: 7.6933e+01\n",
      "2020/09/10, 19:09:24, Iteration: 194000, Train Loss: 3.8165e-01, c1: 1.2260e-01, c2: 1.9823e-01, d1: 6.0326e-04, d2: 4.9455e-04, l1_reg: 3.8900e+02, l2_reg: 7.6959e+01\n",
      "2020/09/10, 19:09:36, Iteration: 195000, Train Loss: 4.5084e-01, c1: 1.2337e-01, c2: 2.0117e-01, d1: 1.2576e-03, d2: 5.2931e-04, l1_reg: 3.8905e+02, l2_reg: 7.6982e+01\n",
      "2020/09/10, 19:09:49, Iteration: 196000, Train Loss: 3.9757e-01, c1: 1.2246e-01, c2: 1.9521e-01, d1: 7.9263e-04, d2: 6.2742e-04, l1_reg: 3.8910e+02, l2_reg: 7.7006e+01\n",
      "2020/09/10, 19:10:02, Iteration: 197000, Train Loss: 3.9586e-01, c1: 1.2213e-01, c2: 1.9594e-01, d1: 7.7271e-04, d2: 5.1255e-04, l1_reg: 3.8913e+02, l2_reg: 7.7025e+01\n",
      "2020/09/10, 19:10:15, Iteration: 198000, Train Loss: 3.8125e-01, c1: 1.2247e-01, c2: 1.9609e-01, d1: 6.2118e-04, d2: 5.5786e-04, l1_reg: 3.8917e+02, l2_reg: 7.7046e+01\n",
      "2020/09/10, 19:10:28, Iteration: 199000, Train Loss: 3.7931e-01, c1: 1.2059e-01, c2: 1.9667e-01, d1: 6.1316e-04, d2: 7.2566e-04, l1_reg: 3.8922e+02, l2_reg: 7.7071e+01\n",
      "2020/09/10, 19:10:41, Iteration: 200000, Train Loss: 4.0467e-01, c1: 1.1974e-01, c2: 1.9655e-01, d1: 8.7792e-04, d2: 5.7921e-04, l1_reg: 3.8927e+02, l2_reg: 7.7093e+01\n",
      "2020/09/10, 19:10:53, Iteration: 201000, Train Loss: 4.5639e-01, c1: 1.1974e-01, c2: 1.9369e-01, d1: 1.4221e-03, d2: 7.5741e-04, l1_reg: 3.8931e+02, l2_reg: 7.7116e+01\n",
      "2020/09/10, 19:11:06, Iteration: 202000, Train Loss: 3.6576e-01, c1: 1.2032e-01, c2: 1.9217e-01, d1: 5.2676e-04, d2: 5.9126e-04, l1_reg: 3.8936e+02, l2_reg: 7.7142e+01\n",
      "2020/09/10, 19:11:19, Iteration: 203000, Train Loss: 4.0644e-01, c1: 1.2062e-01, c2: 1.9169e-01, d1: 9.3504e-04, d2: 6.1402e-04, l1_reg: 3.8941e+02, l2_reg: 7.7165e+01\n",
      "2020/09/10, 19:11:32, Iteration: 204000, Train Loss: 4.4784e-01, c1: 1.1958e-01, c2: 1.9168e-01, d1: 1.3587e-03, d2: 6.9987e-04, l1_reg: 3.8946e+02, l2_reg: 7.7189e+01\n",
      "2020/09/10, 19:11:44, Iteration: 205000, Train Loss: 3.9328e-01, c1: 1.1936e-01, c2: 1.9358e-01, d1: 7.9747e-04, d2: 5.7926e-04, l1_reg: 3.8950e+02, l2_reg: 7.7212e+01\n",
      "2020/09/10, 19:11:57, Iteration: 206000, Train Loss: 4.2474e-01, c1: 1.1840e-01, c2: 1.9136e-01, d1: 1.1453e-03, d2: 4.4958e-04, l1_reg: 3.8955e+02, l2_reg: 7.7238e+01\n",
      "2020/09/10, 19:12:10, Iteration: 207000, Train Loss: 3.8670e-01, c1: 1.1774e-01, c2: 1.9504e-01, d1: 7.3291e-04, d2: 6.3044e-04, l1_reg: 3.8960e+02, l2_reg: 7.7263e+01\n",
      "2020/09/10, 19:12:23, Iteration: 208000, Train Loss: 3.6214e-01, c1: 1.1846e-01, c2: 1.8629e-01, d1: 5.6733e-04, d2: 6.5209e-04, l1_reg: 3.8965e+02, l2_reg: 7.7289e+01\n",
      "2020/09/10, 19:12:36, Iteration: 209000, Train Loss: 3.6935e-01, c1: 1.1777e-01, c2: 1.9321e-01, d1: 5.7814e-04, d2: 5.5095e-04, l1_reg: 3.8969e+02, l2_reg: 7.7310e+01\n",
      "2020/09/10, 19:12:48, Iteration: 210000, Train Loss: 4.2550e-01, c1: 1.1847e-01, c2: 1.9610e-01, d1: 1.1017e-03, d2: 7.5115e-04, l1_reg: 3.8975e+02, l2_reg: 7.7336e+01\n",
      "2020/09/10, 19:13:01, Iteration: 211000, Train Loss: 3.7157e-01, c1: 1.1762e-01, c2: 1.9047e-01, d1: 6.2860e-04, d2: 6.1898e-04, l1_reg: 3.8979e+02, l2_reg: 7.7359e+01\n",
      "2020/09/10, 19:13:14, Iteration: 212000, Train Loss: 3.5768e-01, c1: 1.1730e-01, c2: 1.8967e-01, d1: 5.0099e-04, d2: 6.0215e-04, l1_reg: 3.8984e+02, l2_reg: 7.7383e+01\n",
      "2020/09/10, 19:13:26, Iteration: 213000, Train Loss: 3.8540e-01, c1: 1.1648e-01, c2: 1.8888e-01, d1: 7.9517e-04, d2: 5.2355e-04, l1_reg: 3.8990e+02, l2_reg: 7.7408e+01\n",
      "2020/09/10, 19:13:39, Iteration: 214000, Train Loss: 3.5300e-01, c1: 1.1869e-01, c2: 1.9194e-01, d1: 4.1670e-04, d2: 7.0324e-04, l1_reg: 3.8996e+02, l2_reg: 7.7435e+01\n",
      "2020/09/10, 19:13:52, Iteration: 215000, Train Loss: 4.4073e-01, c1: 1.1713e-01, c2: 1.8856e-01, d1: 1.3460e-03, d2: 4.3527e-04, l1_reg: 3.9001e+02, l2_reg: 7.7458e+01\n",
      "2020/09/10, 19:14:05, Iteration: 216000, Train Loss: 4.1830e-01, c1: 1.1471e-01, c2: 1.8401e-01, d1: 1.1907e-03, d2: 4.9371e-04, l1_reg: 3.9007e+02, l2_reg: 7.7485e+01\n",
      "2020/09/10, 19:14:18, Iteration: 217000, Train Loss: 3.5710e-01, c1: 1.1620e-01, c2: 1.8656e-01, d1: 5.3724e-04, d2: 5.9778e-04, l1_reg: 3.9012e+02, l2_reg: 7.7510e+01\n",
      "2020/09/10, 19:14:31, Iteration: 218000, Train Loss: 4.1408e-01, c1: 1.1422e-01, c2: 1.8883e-01, d1: 1.1042e-03, d2: 6.0430e-04, l1_reg: 3.9018e+02, l2_reg: 7.7538e+01\n",
      "2020/09/10, 19:14:43, Iteration: 219000, Train Loss: 3.9347e-01, c1: 1.1448e-01, c2: 1.8969e-01, d1: 8.8840e-04, d2: 4.5691e-04, l1_reg: 3.9023e+02, l2_reg: 7.7562e+01\n",
      "2020/09/10, 19:14:56, Iteration: 220000, Train Loss: 4.2266e-01, c1: 1.1657e-01, c2: 1.9162e-01, d1: 1.1380e-03, d2: 6.6897e-04, l1_reg: 3.9029e+02, l2_reg: 7.7586e+01\n",
      "2020/09/10, 19:15:09, Iteration: 221000, Train Loss: 3.9772e-01, c1: 1.1149e-01, c2: 1.7923e-01, d1: 1.0634e-03, d2: 6.5799e-04, l1_reg: 3.9034e+02, l2_reg: 7.7613e+01\n",
      "2020/09/10, 19:15:22, Iteration: 222000, Train Loss: 3.8503e-01, c1: 1.1336e-01, c2: 1.8106e-01, d1: 9.0058e-04, d2: 5.5387e-04, l1_reg: 3.9039e+02, l2_reg: 7.7634e+01\n",
      "2020/09/10, 19:15:34, Iteration: 223000, Train Loss: 3.9432e-01, c1: 1.1318e-01, c2: 1.8421e-01, d1: 9.6275e-04, d2: 6.3919e-04, l1_reg: 3.9045e+02, l2_reg: 7.7661e+01\n",
      "2020/09/10, 19:15:47, Iteration: 224000, Train Loss: 4.7261e-01, c1: 1.1285e-01, c2: 1.8826e-01, d1: 1.7084e-03, d2: 6.5093e-04, l1_reg: 3.9051e+02, l2_reg: 7.7689e+01\n",
      "2020/09/10, 19:16:00, Iteration: 225000, Train Loss: 3.8717e-01, c1: 1.1319e-01, c2: 1.8635e-01, d1: 8.7161e-04, d2: 4.6945e-04, l1_reg: 3.9058e+02, l2_reg: 7.7717e+01\n",
      "2020/09/10, 19:16:13, Iteration: 226000, Train Loss: 3.9322e-01, c1: 1.1303e-01, c2: 1.8291e-01, d1: 9.6698e-04, d2: 5.6873e-04, l1_reg: 3.9063e+02, l2_reg: 7.7741e+01\n",
      "2020/09/10, 19:16:26, Iteration: 227000, Train Loss: 3.9082e-01, c1: 1.1335e-01, c2: 1.8836e-01, d1: 8.8481e-04, d2: 6.2700e-04, l1_reg: 3.9069e+02, l2_reg: 7.7769e+01\n",
      "2020/09/10, 19:16:38, Iteration: 228000, Train Loss: 3.3665e-01, c1: 1.1065e-01, c2: 1.7997e-01, d1: 4.5382e-04, d2: 6.4218e-04, l1_reg: 3.9074e+02, l2_reg: 7.7793e+01\n",
      "2020/09/10, 19:16:51, Iteration: 229000, Train Loss: 3.7494e-01, c1: 1.1140e-01, c2: 1.8212e-01, d1: 8.0763e-04, d2: 6.4949e-04, l1_reg: 3.9080e+02, l2_reg: 7.7822e+01\n",
      "2020/09/10, 19:17:04, Iteration: 230000, Train Loss: 3.5108e-01, c1: 1.1278e-01, c2: 1.8603e-01, d1: 5.1649e-04, d2: 6.2393e-04, l1_reg: 3.9086e+02, l2_reg: 7.7848e+01\n",
      "2020/09/10, 19:17:17, Iteration: 231000, Train Loss: 3.5070e-01, c1: 1.0983e-01, c2: 1.7463e-01, d1: 6.5665e-04, d2: 5.7317e-04, l1_reg: 3.9091e+02, l2_reg: 7.7872e+01\n",
      "2020/09/10, 19:17:30, Iteration: 232000, Train Loss: 3.9192e-01, c1: 1.1198e-01, c2: 1.8758e-01, d1: 9.1740e-04, d2: 6.1796e-04, l1_reg: 3.9097e+02, l2_reg: 7.7900e+01\n",
      "2020/09/10, 19:17:42, Iteration: 233000, Train Loss: 4.1363e-01, c1: 1.1084e-01, c2: 1.8087e-01, d1: 1.2143e-03, d2: 4.8204e-04, l1_reg: 3.9103e+02, l2_reg: 7.7924e+01\n",
      "2020/09/10, 19:17:55, Iteration: 234000, Train Loss: 3.4716e-01, c1: 1.1041e-01, c2: 1.8455e-01, d1: 5.1580e-04, d2: 6.1595e-04, l1_reg: 3.9109e+02, l2_reg: 7.7953e+01\n",
      "2020/09/10, 19:18:08, Iteration: 235000, Train Loss: 4.1052e-01, c1: 1.1063e-01, c2: 1.8268e-01, d1: 1.1663e-03, d2: 5.7369e-04, l1_reg: 3.9116e+02, l2_reg: 7.7981e+01\n",
      "2020/09/10, 19:18:21, Iteration: 236000, Train Loss: 4.0658e-01, c1: 1.0939e-01, c2: 1.8118e-01, d1: 1.1545e-03, d2: 5.4760e-04, l1_reg: 3.9122e+02, l2_reg: 7.8010e+01\n",
      "2020/09/10, 19:18:34, Iteration: 237000, Train Loss: 3.8061e-01, c1: 1.0924e-01, c2: 1.8312e-01, d1: 8.7761e-04, d2: 4.8683e-04, l1_reg: 3.9127e+02, l2_reg: 7.8034e+01\n",
      "2020/09/10, 19:18:46, Iteration: 238000, Train Loss: 3.7131e-01, c1: 1.1041e-01, c2: 1.8599e-01, d1: 7.4342e-04, d2: 5.6173e-04, l1_reg: 3.9135e+02, l2_reg: 7.8067e+01\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:18:59, Iteration: 239000, Train Loss: 3.3968e-01, c1: 1.0790e-01, c2: 1.7916e-01, d1: 5.2168e-04, d2: 4.4970e-04, l1_reg: 3.9140e+02, l2_reg: 7.8092e+01\n",
      "2020/09/10, 19:19:12, Iteration: 240000, Train Loss: 3.6147e-01, c1: 1.0870e-01, c2: 1.8205e-01, d1: 7.0199e-04, d2: 5.1457e-04, l1_reg: 3.9147e+02, l2_reg: 7.8121e+01\n"
     ]
    }
   ],
   "source": [
    "config.iterations = 200000\n",
    "agent.train(config.iterations, batch_fn, evaluate_batch_fn, config.print_every, config.save_every, config.loss_names, config.log_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:25:38, Iteration: 241000, Train Loss: 2.8086e-01, c1: 1.0484e-01, c2: 1.6786e-01, d1: 7.5359e-03, d2: 6.2088e-04, l1_reg: 3.9139e+02, l2_reg: 7.8085e+01\n",
      "2020/09/10, 19:25:51, Iteration: 242000, Train Loss: 2.6297e-01, c1: 9.9877e-02, c2: 1.4520e-01, d1: 1.7204e-02, d2: 6.9163e-04, l1_reg: 3.9132e+02, l2_reg: 7.8050e+01\n",
      "2020/09/10, 19:26:04, Iteration: 243000, Train Loss: 2.6476e-01, c1: 9.7132e-02, c2: 1.4191e-01, d1: 2.5136e-02, d2: 5.7689e-04, l1_reg: 3.9126e+02, l2_reg: 7.8021e+01\n",
      "2020/09/10, 19:26:16, Iteration: 244000, Train Loss: 2.4111e-01, c1: 9.1140e-02, c2: 1.2085e-01, d1: 2.8512e-02, d2: 6.0505e-04, l1_reg: 3.9121e+02, l2_reg: 7.8005e+01\n",
      "2020/09/10, 19:26:29, Iteration: 245000, Train Loss: 2.3734e-01, c1: 8.4565e-02, c2: 1.0973e-01, d1: 4.2502e-02, d2: 5.4072e-04, l1_reg: 3.9120e+02, l2_reg: 7.8009e+01\n",
      "2020/09/10, 19:26:42, Iteration: 246000, Train Loss: 2.3679e-01, c1: 7.5434e-02, c2: 9.5731e-02, d1: 6.5144e-02, d2: 4.8145e-04, l1_reg: 3.9131e+02, l2_reg: 7.8063e+01\n",
      "2020/09/10, 19:26:54, Iteration: 247000, Train Loss: 2.0536e-01, c1: 6.7269e-02, c2: 8.4579e-02, d1: 5.2973e-02, d2: 5.3964e-04, l1_reg: 3.9153e+02, l2_reg: 7.8162e+01\n",
      "2020/09/10, 19:27:07, Iteration: 248000, Train Loss: 1.9117e-01, c1: 5.9063e-02, c2: 7.9467e-02, d1: 5.2114e-02, d2: 5.2631e-04, l1_reg: 3.9192e+02, l2_reg: 7.8370e+01\n",
      "2020/09/10, 19:27:20, Iteration: 249000, Train Loss: 1.7877e-01, c1: 5.2921e-02, c2: 7.9444e-02, d1: 4.5976e-02, d2: 4.2938e-04, l1_reg: 3.9296e+02, l2_reg: 7.8920e+01\n",
      "2020/09/10, 19:27:33, Iteration: 250000, Train Loss: 1.5728e-01, c1: 4.6945e-02, c2: 7.7314e-02, d1: 3.2587e-02, d2: 4.3347e-04, l1_reg: 3.9516e+02, l2_reg: 8.0070e+01\n",
      "2020/09/10, 19:27:45, Iteration: 251000, Train Loss: 1.3336e-01, c1: 4.0131e-02, c2: 7.7790e-02, d1: 1.5026e-02, d2: 4.0618e-04, l1_reg: 3.9909e+02, l2_reg: 8.2042e+01\n",
      "2020/09/10, 19:27:58, Iteration: 252000, Train Loss: 1.1247e-01, c1: 3.3304e-02, c2: 7.0545e-02, d1: 8.0502e-03, d2: 5.6384e-04, l1_reg: 4.0358e+02, l2_reg: 8.4246e+01\n",
      "2020/09/10, 19:28:11, Iteration: 253000, Train Loss: 9.4317e-02, c1: 2.8243e-02, c2: 6.1238e-02, d1: 4.4352e-03, d2: 3.9701e-04, l1_reg: 4.0698e+02, l2_reg: 8.5889e+01\n",
      "2020/09/10, 19:28:24, Iteration: 254000, Train Loss: 8.7667e-02, c1: 2.5623e-02, c2: 5.5797e-02, d1: 5.8651e-03, d2: 3.7754e-04, l1_reg: 4.0952e+02, l2_reg: 8.7119e+01\n",
      "2020/09/10, 19:28:37, Iteration: 255000, Train Loss: 8.0205e-02, c1: 2.2727e-02, c2: 5.1344e-02, d1: 5.7218e-03, d2: 4.0707e-04, l1_reg: 4.1162e+02, l2_reg: 8.8155e+01\n",
      "2020/09/10, 19:28:50, Iteration: 256000, Train Loss: 7.5266e-02, c1: 2.2678e-02, c2: 4.8474e-02, d1: 3.7198e-03, d2: 3.8964e-04, l1_reg: 4.1348e+02, l2_reg: 8.9093e+01\n",
      "2020/09/10, 19:29:03, Iteration: 257000, Train Loss: 7.0540e-02, c1: 2.0734e-02, c2: 4.5728e-02, d1: 3.7397e-03, d2: 3.3284e-04, l1_reg: 4.1525e+02, l2_reg: 8.9990e+01\n",
      "2020/09/10, 19:29:16, Iteration: 258000, Train Loss: 6.6235e-02, c1: 1.9788e-02, c2: 4.2789e-02, d1: 3.2417e-03, d2: 4.1149e-04, l1_reg: 4.1692e+02, l2_reg: 9.0824e+01\n",
      "2020/09/10, 19:29:28, Iteration: 259000, Train Loss: 6.6848e-02, c1: 1.8704e-02, c2: 4.3540e-02, d1: 4.2728e-03, d2: 3.2558e-04, l1_reg: 4.1855e+02, l2_reg: 9.1627e+01\n",
      "2020/09/10, 19:29:41, Iteration: 260000, Train Loss: 5.8339e-02, c1: 1.7341e-02, c2: 3.7794e-02, d1: 2.9308e-03, d2: 2.6742e-04, l1_reg: 4.2007e+02, l2_reg: 9.2391e+01\n",
      "2020/09/10, 19:29:54, Iteration: 261000, Train Loss: 5.8105e-02, c1: 1.6671e-02, c2: 3.8482e-02, d1: 2.6766e-03, d2: 2.6965e-04, l1_reg: 4.2157e+02, l2_reg: 9.3141e+01\n",
      "2020/09/10, 19:30:07, Iteration: 262000, Train Loss: 5.4939e-02, c1: 1.5920e-02, c2: 3.5910e-02, d1: 2.7589e-03, d2: 3.4445e-04, l1_reg: 4.2300e+02, l2_reg: 9.3850e+01\n",
      "2020/09/10, 19:30:20, Iteration: 263000, Train Loss: 5.3059e-02, c1: 1.5630e-02, c2: 3.4709e-02, d1: 2.4356e-03, d2: 2.8039e-04, l1_reg: 4.2432e+02, l2_reg: 9.4516e+01\n",
      "2020/09/10, 19:30:33, Iteration: 264000, Train Loss: 5.2872e-02, c1: 1.5156e-02, c2: 3.4677e-02, d1: 2.7837e-03, d2: 2.5019e-04, l1_reg: 4.2552e+02, l2_reg: 9.5148e+01\n",
      "2020/09/10, 19:30:46, Iteration: 265000, Train Loss: 5.0074e-02, c1: 1.4936e-02, c2: 3.2747e-02, d1: 2.1001e-03, d2: 2.8517e-04, l1_reg: 4.2661e+02, l2_reg: 9.5743e+01\n",
      "2020/09/10, 19:30:59, Iteration: 266000, Train Loss: 4.9940e-02, c1: 1.4256e-02, c2: 3.1803e-02, d1: 3.5676e-03, d2: 3.0740e-04, l1_reg: 4.2759e+02, l2_reg: 9.6302e+01\n",
      "2020/09/10, 19:31:11, Iteration: 267000, Train Loss: 4.8644e-02, c1: 1.3813e-02, c2: 3.2147e-02, d1: 2.4233e-03, d2: 2.5619e-04, l1_reg: 4.2849e+02, l2_reg: 9.6831e+01\n",
      "2020/09/10, 19:31:24, Iteration: 268000, Train Loss: 4.6630e-02, c1: 1.3139e-02, c2: 3.1220e-02, d1: 1.9988e-03, d2: 2.6722e-04, l1_reg: 4.2934e+02, l2_reg: 9.7342e+01\n",
      "2020/09/10, 19:31:37, Iteration: 269000, Train Loss: 4.6797e-02, c1: 1.3592e-02, c2: 3.0066e-02, d1: 2.7099e-03, d2: 4.2389e-04, l1_reg: 4.3014e+02, l2_reg: 9.7829e+01\n",
      "2020/09/10, 19:31:50, Iteration: 270000, Train Loss: 4.3530e-02, c1: 1.2650e-02, c2: 2.6809e-02, d1: 3.7662e-03, d2: 2.9877e-04, l1_reg: 4.3091e+02, l2_reg: 9.8312e+01\n",
      "2020/09/10, 19:32:03, Iteration: 271000, Train Loss: 4.3172e-02, c1: 1.2604e-02, c2: 2.8327e-02, d1: 1.9145e-03, d2: 3.2122e-04, l1_reg: 4.3165e+02, l2_reg: 9.8778e+01\n",
      "2020/09/10, 19:32:16, Iteration: 272000, Train Loss: 4.1331e-02, c1: 1.1789e-02, c2: 2.7136e-02, d1: 2.1713e-03, d2: 2.2949e-04, l1_reg: 4.3235e+02, l2_reg: 9.9226e+01\n",
      "2020/09/10, 19:32:28, Iteration: 273000, Train Loss: 4.1150e-02, c1: 1.1862e-02, c2: 2.7078e-02, d1: 1.9384e-03, d2: 2.6650e-04, l1_reg: 4.3302e+02, l2_reg: 9.9661e+01\n",
      "2020/09/10, 19:32:41, Iteration: 274000, Train Loss: 3.9460e-02, c1: 1.0967e-02, c2: 2.6263e-02, d1: 2.0020e-03, d2: 2.2342e-04, l1_reg: 4.3369e+02, l2_reg: 1.0009e+02\n",
      "2020/09/10, 19:32:54, Iteration: 275000, Train Loss: 4.3330e-02, c1: 1.1906e-02, c2: 2.7536e-02, d1: 3.5579e-03, d2: 3.2496e-04, l1_reg: 4.3433e+02, l2_reg: 1.0052e+02\n",
      "2020/09/10, 19:33:07, Iteration: 276000, Train Loss: 3.9608e-02, c1: 1.0785e-02, c2: 2.6373e-02, d1: 2.2286e-03, d2: 2.1662e-04, l1_reg: 4.3493e+02, l2_reg: 1.0092e+02\n",
      "2020/09/10, 19:33:20, Iteration: 277000, Train Loss: 3.8971e-02, c1: 1.0839e-02, c2: 2.4244e-02, d1: 3.6479e-03, d2: 2.3437e-04, l1_reg: 4.3551e+02, l2_reg: 1.0132e+02\n",
      "2020/09/10, 19:33:33, Iteration: 278000, Train Loss: 3.7051e-02, c1: 1.0573e-02, c2: 2.4060e-02, d1: 2.0275e-03, d2: 3.8452e-04, l1_reg: 4.3609e+02, l2_reg: 1.0171e+02\n",
      "2020/09/10, 19:33:45, Iteration: 279000, Train Loss: 3.6865e-02, c1: 1.0442e-02, c2: 2.4405e-02, d1: 1.7843e-03, d2: 2.2806e-04, l1_reg: 4.3664e+02, l2_reg: 1.0210e+02\n",
      "2020/09/10, 19:33:58, Iteration: 280000, Train Loss: 3.6947e-02, c1: 1.0610e-02, c2: 2.3795e-02, d1: 2.1004e-03, d2: 4.3581e-04, l1_reg: 4.3716e+02, l2_reg: 1.0247e+02\n",
      "2020/09/10, 19:34:11, Iteration: 281000, Train Loss: 3.7017e-02, c1: 1.0087e-02, c2: 2.4266e-02, d1: 2.4898e-03, d2: 1.6864e-04, l1_reg: 4.3768e+02, l2_reg: 1.0284e+02\n",
      "2020/09/10, 19:34:24, Iteration: 282000, Train Loss: 3.5023e-02, c1: 9.9698e-03, c2: 2.2683e-02, d1: 2.1901e-03, d2: 1.7431e-04, l1_reg: 4.3816e+02, l2_reg: 1.0320e+02\n",
      "2020/09/10, 19:34:37, Iteration: 283000, Train Loss: 3.6122e-02, c1: 9.8670e-03, c2: 2.3238e-02, d1: 2.7841e-03, d2: 2.2827e-04, l1_reg: 4.3865e+02, l2_reg: 1.0356e+02\n",
      "2020/09/10, 19:34:50, Iteration: 284000, Train Loss: 3.4777e-02, c1: 9.7047e-03, c2: 2.2853e-02, d1: 2.0463e-03, d2: 1.6805e-04, l1_reg: 4.3915e+02, l2_reg: 1.0393e+02\n",
      "2020/09/10, 19:35:02, Iteration: 285000, Train Loss: 3.4620e-02, c1: 1.0025e-02, c2: 2.1893e-02, d1: 2.4872e-03, d2: 2.0980e-04, l1_reg: 4.3963e+02, l2_reg: 1.0428e+02\n",
      "2020/09/10, 19:35:15, Iteration: 286000, Train Loss: 3.4822e-02, c1: 9.7286e-03, c2: 2.2713e-02, d1: 2.2297e-03, d2: 1.4599e-04, l1_reg: 4.4010e+02, l2_reg: 1.0463e+02\n",
      "2020/09/10, 19:35:28, Iteration: 287000, Train Loss: 3.3986e-02, c1: 9.4511e-03, c2: 2.1977e-02, d1: 2.4018e-03, d2: 1.5103e-04, l1_reg: 4.4058e+02, l2_reg: 1.0498e+02\n",
      "2020/09/10, 19:35:41, Iteration: 288000, Train Loss: 3.3214e-02, c1: 9.5673e-03, c2: 2.1346e-02, d1: 2.1005e-03, d2: 1.9535e-04, l1_reg: 4.4106e+02, l2_reg: 1.0533e+02\n",
      "2020/09/10, 19:35:54, Iteration: 289000, Train Loss: 3.5107e-02, c1: 9.2297e-03, c2: 2.2512e-02, d1: 3.1593e-03, d2: 2.0122e-04, l1_reg: 4.4152e+02, l2_reg: 1.0567e+02\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:36:07, Iteration: 290000, Train Loss: 3.1074e-02, c1: 8.9265e-03, c2: 1.9566e-02, d1: 2.4274e-03, d2: 1.4852e-04, l1_reg: 4.4196e+02, l2_reg: 1.0599e+02\n",
      "2020/09/10, 19:36:20, Iteration: 291000, Train Loss: 3.3684e-02, c1: 9.4770e-03, c2: 2.0936e-02, d1: 3.0833e-03, d2: 1.8246e-04, l1_reg: 4.4243e+02, l2_reg: 1.0632e+02\n",
      "2020/09/10, 19:36:32, Iteration: 292000, Train Loss: 3.2286e-02, c1: 8.7418e-03, c2: 2.0904e-02, d1: 2.4740e-03, d2: 1.6059e-04, l1_reg: 4.4288e+02, l2_reg: 1.0665e+02\n",
      "2020/09/10, 19:36:45, Iteration: 293000, Train Loss: 3.3598e-02, c1: 9.6390e-03, c2: 2.2135e-02, d1: 1.6704e-03, d2: 1.4845e-04, l1_reg: 4.4332e+02, l2_reg: 1.0696e+02\n",
      "2020/09/10, 19:36:58, Iteration: 294000, Train Loss: 3.0594e-02, c1: 9.2685e-03, c2: 1.9023e-02, d1: 2.1664e-03, d2: 1.3054e-04, l1_reg: 4.4374e+02, l2_reg: 1.0727e+02\n",
      "2020/09/10, 19:37:11, Iteration: 295000, Train Loss: 3.1291e-02, c1: 8.4787e-03, c2: 1.9695e-02, d1: 2.9577e-03, d2: 1.5391e-04, l1_reg: 4.4415e+02, l2_reg: 1.0756e+02\n",
      "2020/09/10, 19:37:24, Iteration: 296000, Train Loss: 3.1578e-02, c1: 8.8454e-03, c2: 1.9514e-02, d1: 3.0691e-03, d2: 1.4395e-04, l1_reg: 4.4458e+02, l2_reg: 1.0786e+02\n",
      "2020/09/10, 19:37:37, Iteration: 297000, Train Loss: 2.9191e-02, c1: 8.5094e-03, c2: 1.8417e-02, d1: 2.0858e-03, d2: 1.7327e-04, l1_reg: 4.4500e+02, l2_reg: 1.0816e+02\n",
      "2020/09/10, 19:37:50, Iteration: 298000, Train Loss: 3.0977e-02, c1: 8.1641e-03, c2: 1.8922e-02, d1: 3.5492e-03, d2: 3.3638e-04, l1_reg: 4.4540e+02, l2_reg: 1.0845e+02\n",
      "2020/09/10, 19:38:02, Iteration: 299000, Train Loss: 3.0041e-02, c1: 8.1661e-03, c2: 1.8457e-02, d1: 3.1833e-03, d2: 2.2934e-04, l1_reg: 4.4580e+02, l2_reg: 1.0873e+02\n",
      "2020/09/10, 19:38:15, Iteration: 300000, Train Loss: 2.9890e-02, c1: 8.3096e-03, c2: 1.9327e-02, d1: 2.0569e-03, d2: 1.9105e-04, l1_reg: 4.4617e+02, l2_reg: 1.0899e+02\n",
      "2020/09/10, 19:38:28, Iteration: 301000, Train Loss: 3.0386e-02, c1: 8.4059e-03, c2: 1.9810e-02, d1: 1.9814e-03, d2: 1.8300e-04, l1_reg: 4.4657e+02, l2_reg: 1.0927e+02\n",
      "2020/09/10, 19:38:41, Iteration: 302000, Train Loss: 2.9427e-02, c1: 8.0840e-03, c2: 1.8441e-02, d1: 2.7093e-03, d2: 1.8638e-04, l1_reg: 4.4696e+02, l2_reg: 1.0954e+02\n",
      "2020/09/10, 19:38:54, Iteration: 303000, Train Loss: 2.9394e-02, c1: 8.0322e-03, c2: 1.8199e-02, d1: 2.9143e-03, d2: 2.4233e-04, l1_reg: 4.4734e+02, l2_reg: 1.0980e+02\n",
      "2020/09/10, 19:39:06, Iteration: 304000, Train Loss: 2.9413e-02, c1: 7.8859e-03, c2: 1.9274e-02, d1: 2.1122e-03, d2: 1.3527e-04, l1_reg: 4.4771e+02, l2_reg: 1.1006e+02\n",
      "2020/09/10, 19:39:19, Iteration: 305000, Train Loss: 3.1323e-02, c1: 8.5425e-03, c2: 1.8432e-02, d1: 4.2108e-03, d2: 1.3260e-04, l1_reg: 4.4809e+02, l2_reg: 1.1031e+02\n",
      "2020/09/10, 19:39:32, Iteration: 306000, Train Loss: 2.8336e-02, c1: 7.9673e-03, c2: 1.7205e-02, d1: 3.0224e-03, d2: 1.3575e-04, l1_reg: 4.4844e+02, l2_reg: 1.1056e+02\n",
      "2020/09/10, 19:39:45, Iteration: 307000, Train Loss: 2.7644e-02, c1: 7.4546e-03, c2: 1.7410e-02, d1: 2.6593e-03, d2: 1.1509e-04, l1_reg: 4.4879e+02, l2_reg: 1.1081e+02\n",
      "2020/09/10, 19:39:58, Iteration: 308000, Train Loss: 2.8327e-02, c1: 7.5804e-03, c2: 1.8103e-02, d1: 2.4553e-03, d2: 1.8242e-04, l1_reg: 4.4915e+02, l2_reg: 1.1105e+02\n",
      "2020/09/10, 19:40:10, Iteration: 309000, Train Loss: 2.8222e-02, c1: 7.1624e-03, c2: 1.7451e-02, d1: 3.3369e-03, d2: 2.6554e-04, l1_reg: 4.4950e+02, l2_reg: 1.1129e+02\n",
      "2020/09/10, 19:40:23, Iteration: 310000, Train Loss: 2.7005e-02, c1: 7.3846e-03, c2: 1.7190e-02, d1: 2.2567e-03, d2: 1.6810e-04, l1_reg: 4.4986e+02, l2_reg: 1.1154e+02\n",
      "2020/09/10, 19:40:36, Iteration: 311000, Train Loss: 2.6560e-02, c1: 7.9481e-03, c2: 1.6397e-02, d1: 2.0862e-03, d2: 1.2390e-04, l1_reg: 4.5021e+02, l2_reg: 1.1178e+02\n",
      "2020/09/10, 19:40:49, Iteration: 312000, Train Loss: 2.7642e-02, c1: 7.4916e-03, c2: 1.6417e-02, d1: 3.6302e-03, d2: 9.7776e-05, l1_reg: 4.5054e+02, l2_reg: 1.1201e+02\n",
      "2020/09/10, 19:41:02, Iteration: 313000, Train Loss: 2.6916e-02, c1: 7.6666e-03, c2: 1.7218e-02, d1: 1.8619e-03, d2: 1.6450e-04, l1_reg: 4.5088e+02, l2_reg: 1.1224e+02\n",
      "2020/09/10, 19:41:15, Iteration: 314000, Train Loss: 2.9658e-02, c1: 7.8926e-03, c2: 1.8826e-02, d1: 2.8291e-03, d2: 1.0512e-04, l1_reg: 4.5121e+02, l2_reg: 1.1247e+02\n",
      "2020/09/10, 19:41:27, Iteration: 315000, Train Loss: 2.6309e-02, c1: 7.2762e-03, c2: 1.7283e-02, d1: 1.6218e-03, d2: 1.2235e-04, l1_reg: 4.5153e+02, l2_reg: 1.1269e+02\n",
      "2020/09/10, 19:41:40, Iteration: 316000, Train Loss: 2.5069e-02, c1: 7.0951e-03, c2: 1.5491e-02, d1: 2.3588e-03, d2: 1.1798e-04, l1_reg: 4.5187e+02, l2_reg: 1.1292e+02\n",
      "2020/09/10, 19:41:53, Iteration: 317000, Train Loss: 2.6321e-02, c1: 7.0711e-03, c2: 1.6451e-02, d1: 2.6643e-03, d2: 1.2895e-04, l1_reg: 4.5220e+02, l2_reg: 1.1315e+02\n",
      "2020/09/10, 19:42:06, Iteration: 318000, Train Loss: 2.7149e-02, c1: 7.8198e-03, c2: 1.7177e-02, d1: 1.8780e-03, d2: 2.6820e-04, l1_reg: 4.5252e+02, l2_reg: 1.1336e+02\n",
      "2020/09/10, 19:42:19, Iteration: 319000, Train Loss: 2.7530e-02, c1: 7.9762e-03, c2: 1.7154e-02, d1: 2.2272e-03, d2: 1.6686e-04, l1_reg: 4.5282e+02, l2_reg: 1.1357e+02\n",
      "2020/09/10, 19:42:32, Iteration: 320000, Train Loss: 2.9587e-02, c1: 7.4371e-03, c2: 1.6473e-02, d1: 5.5639e-03, d2: 1.0757e-04, l1_reg: 4.5311e+02, l2_reg: 1.1378e+02\n",
      "2020/09/10, 19:42:45, Iteration: 321000, Train Loss: 2.7231e-02, c1: 8.0123e-03, c2: 1.7107e-02, d1: 2.0115e-03, d2: 9.4092e-05, l1_reg: 4.5342e+02, l2_reg: 1.1399e+02\n",
      "2020/09/10, 19:42:57, Iteration: 322000, Train Loss: 2.6109e-02, c1: 7.3476e-03, c2: 1.6315e-02, d1: 2.3150e-03, d2: 1.2552e-04, l1_reg: 4.5371e+02, l2_reg: 1.1420e+02\n",
      "2020/09/10, 19:43:10, Iteration: 323000, Train Loss: 2.5901e-02, c1: 7.0229e-03, c2: 1.6883e-02, d1: 1.8514e-03, d2: 1.3828e-04, l1_reg: 4.5401e+02, l2_reg: 1.1440e+02\n",
      "2020/09/10, 19:43:23, Iteration: 324000, Train Loss: 2.5778e-02, c1: 6.9951e-03, c2: 1.5668e-02, d1: 2.8549e-03, d2: 2.5456e-04, l1_reg: 4.5431e+02, l2_reg: 1.1461e+02\n",
      "2020/09/10, 19:43:36, Iteration: 325000, Train Loss: 2.5871e-02, c1: 7.1869e-03, c2: 1.5873e-02, d1: 2.5684e-03, d2: 2.3742e-04, l1_reg: 4.5459e+02, l2_reg: 1.1481e+02\n",
      "2020/09/10, 19:43:49, Iteration: 326000, Train Loss: 2.6847e-02, c1: 6.8507e-03, c2: 1.6433e-02, d1: 3.4216e-03, d2: 1.3594e-04, l1_reg: 4.5487e+02, l2_reg: 1.1501e+02\n",
      "2020/09/10, 19:44:01, Iteration: 327000, Train Loss: 2.4777e-02, c1: 6.8816e-03, c2: 1.5840e-02, d1: 1.8173e-03, d2: 2.3233e-04, l1_reg: 4.5516e+02, l2_reg: 1.1521e+02\n",
      "2020/09/10, 19:44:14, Iteration: 328000, Train Loss: 2.7253e-02, c1: 6.8423e-03, c2: 1.5861e-02, d1: 4.4393e-03, d2: 1.0488e-04, l1_reg: 4.5544e+02, l2_reg: 1.1541e+02\n",
      "2020/09/10, 19:44:27, Iteration: 329000, Train Loss: 2.5366e-02, c1: 6.9944e-03, c2: 1.6053e-02, d1: 2.2048e-03, d2: 1.0802e-04, l1_reg: 4.5572e+02, l2_reg: 1.1561e+02\n",
      "2020/09/10, 19:44:40, Iteration: 330000, Train Loss: 2.7499e-02, c1: 7.6886e-03, c2: 1.6743e-02, d1: 2.7331e-03, d2: 3.2803e-04, l1_reg: 4.5599e+02, l2_reg: 1.1579e+02\n",
      "2020/09/10, 19:44:53, Iteration: 331000, Train Loss: 2.7106e-02, c1: 6.7312e-03, c2: 1.6434e-02, d1: 3.8346e-03, d2: 1.0009e-04, l1_reg: 4.5627e+02, l2_reg: 1.1599e+02\n",
      "2020/09/10, 19:45:06, Iteration: 332000, Train Loss: 2.5337e-02, c1: 6.8484e-03, c2: 1.5558e-02, d1: 2.8114e-03, d2: 1.1396e-04, l1_reg: 4.5653e+02, l2_reg: 1.1618e+02\n",
      "2020/09/10, 19:45:19, Iteration: 333000, Train Loss: 2.2824e-02, c1: 6.4148e-03, c2: 1.3547e-02, d1: 2.7490e-03, d2: 1.0771e-04, l1_reg: 4.5680e+02, l2_reg: 1.1637e+02\n",
      "2020/09/10, 19:45:31, Iteration: 334000, Train Loss: 2.4846e-02, c1: 6.7625e-03, c2: 1.5297e-02, d1: 2.6625e-03, d2: 1.1809e-04, l1_reg: 4.5706e+02, l2_reg: 1.1655e+02\n",
      "2020/09/10, 19:45:44, Iteration: 335000, Train Loss: 2.3923e-02, c1: 7.0256e-03, c2: 1.4508e-02, d1: 2.2056e-03, d2: 1.7807e-04, l1_reg: 4.5732e+02, l2_reg: 1.1674e+02\n",
      "2020/09/10, 19:45:57, Iteration: 336000, Train Loss: 2.4994e-02, c1: 6.3394e-03, c2: 1.5272e-02, d1: 3.0882e-03, d2: 2.8867e-04, l1_reg: 4.5759e+02, l2_reg: 1.1693e+02\n",
      "2020/09/10, 19:46:10, Iteration: 337000, Train Loss: 2.2573e-02, c1: 5.8009e-03, c2: 1.4506e-02, d1: 2.1700e-03, d2: 9.0246e-05, l1_reg: 4.5786e+02, l2_reg: 1.1712e+02\n",
      "2020/09/10, 19:46:23, Iteration: 338000, Train Loss: 2.4567e-02, c1: 6.4841e-03, c2: 1.6096e-02, d1: 1.7192e-03, d2: 2.6168e-04, l1_reg: 4.5812e+02, l2_reg: 1.1730e+02\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:46:36, Iteration: 339000, Train Loss: 2.4044e-02, c1: 6.7109e-03, c2: 1.4258e-02, d1: 2.8597e-03, d2: 2.1022e-04, l1_reg: 4.5837e+02, l2_reg: 1.1749e+02\n",
      "2020/09/10, 19:46:49, Iteration: 340000, Train Loss: 2.4411e-02, c1: 6.3586e-03, c2: 1.5237e-02, d1: 2.6877e-03, d2: 1.2244e-04, l1_reg: 4.5863e+02, l2_reg: 1.1767e+02\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/lib/python3.8/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray\n",
      "  return array(a, dtype, copy=False, order=order)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:47:01, Iteration: 341000, Train Loss: 2.5060e-02, c1: 6.6365e-03, c2: 1.4762e-02, d1: 3.5441e-03, d2: 1.1093e-04, l1_reg: 4.5889e+02, l2_reg: 1.1785e+02\n",
      "2020/09/10, 19:47:14, Iteration: 342000, Train Loss: 2.3198e-02, c1: 6.6320e-03, c2: 1.4087e-02, d1: 2.3361e-03, d2: 1.3734e-04, l1_reg: 4.5915e+02, l2_reg: 1.1804e+02\n",
      "2020/09/10, 19:47:27, Iteration: 343000, Train Loss: 2.5415e-02, c1: 6.7045e-03, c2: 1.4578e-02, d1: 4.0303e-03, d2: 9.6432e-05, l1_reg: 4.5941e+02, l2_reg: 1.1822e+02\n",
      "2020/09/10, 19:47:40, Iteration: 344000, Train Loss: 2.4316e-02, c1: 6.5822e-03, c2: 1.5245e-02, d1: 2.2712e-03, d2: 2.1226e-04, l1_reg: 4.5966e+02, l2_reg: 1.1840e+02\n",
      "2020/09/10, 19:47:53, Iteration: 345000, Train Loss: 2.2886e-02, c1: 6.1473e-03, c2: 1.4416e-02, d1: 2.2192e-03, d2: 9.7040e-05, l1_reg: 4.5989e+02, l2_reg: 1.1857e+02\n",
      "2020/09/10, 19:48:05, Iteration: 346000, Train Loss: 2.2637e-02, c1: 6.4971e-03, c2: 1.3587e-02, d1: 2.4418e-03, d2: 1.0618e-04, l1_reg: 4.6015e+02, l2_reg: 1.1875e+02\n",
      "2020/09/10, 19:48:18, Iteration: 347000, Train Loss: 2.1966e-02, c1: 6.3278e-03, c2: 1.3686e-02, d1: 1.8319e-03, d2: 1.1438e-04, l1_reg: 4.6041e+02, l2_reg: 1.1893e+02\n",
      "2020/09/10, 19:48:31, Iteration: 348000, Train Loss: 2.2587e-02, c1: 6.4924e-03, c2: 1.4073e-02, d1: 1.9180e-03, d2: 9.7778e-05, l1_reg: 4.6065e+02, l2_reg: 1.1911e+02\n",
      "2020/09/10, 19:48:44, Iteration: 349000, Train Loss: 2.2421e-02, c1: 6.3428e-03, c2: 1.3719e-02, d1: 2.2271e-03, d2: 1.2672e-04, l1_reg: 4.6089e+02, l2_reg: 1.1929e+02\n",
      "2020/09/10, 19:48:57, Iteration: 350000, Train Loss: 2.3188e-02, c1: 5.9233e-03, c2: 1.3946e-02, d1: 3.2054e-03, d2: 1.0761e-04, l1_reg: 4.6112e+02, l2_reg: 1.1945e+02\n",
      "2020/09/10, 19:49:10, Iteration: 351000, Train Loss: 2.5332e-02, c1: 6.6939e-03, c2: 1.5417e-02, d1: 3.0204e-03, d2: 1.9479e-04, l1_reg: 4.6137e+02, l2_reg: 1.1963e+02\n",
      "2020/09/10, 19:49:23, Iteration: 352000, Train Loss: 2.2042e-02, c1: 6.0790e-03, c2: 1.2807e-02, d1: 3.0503e-03, d2: 9.9714e-05, l1_reg: 4.6161e+02, l2_reg: 1.1980e+02\n",
      "2020/09/10, 19:49:36, Iteration: 353000, Train Loss: 2.3747e-02, c1: 5.8657e-03, c2: 1.3554e-02, d1: 4.1282e-03, d2: 1.9329e-04, l1_reg: 4.6186e+02, l2_reg: 1.1998e+02\n",
      "2020/09/10, 19:49:48, Iteration: 354000, Train Loss: 2.1646e-02, c1: 6.1880e-03, c2: 1.3050e-02, d1: 2.3035e-03, d2: 9.8895e-05, l1_reg: 4.6210e+02, l2_reg: 1.2015e+02\n",
      "2020/09/10, 19:50:01, Iteration: 355000, Train Loss: 2.4496e-02, c1: 6.4814e-03, c2: 1.4982e-02, d1: 2.9114e-03, d2: 1.1569e-04, l1_reg: 4.6235e+02, l2_reg: 1.2033e+02\n",
      "2020/09/10, 19:50:14, Iteration: 356000, Train Loss: 2.3536e-02, c1: 6.4502e-03, c2: 1.4944e-02, d1: 1.8981e-03, d2: 2.3842e-04, l1_reg: 4.6260e+02, l2_reg: 1.2050e+02\n",
      "2020/09/10, 19:50:27, Iteration: 357000, Train Loss: 2.2771e-02, c1: 6.1468e-03, c2: 1.4603e-02, d1: 1.8520e-03, d2: 1.6408e-04, l1_reg: 4.6284e+02, l2_reg: 1.2067e+02\n",
      "2020/09/10, 19:50:40, Iteration: 358000, Train Loss: 2.4120e-02, c1: 6.2471e-03, c2: 1.5182e-02, d1: 2.5982e-03, d2: 8.7219e-05, l1_reg: 4.6309e+02, l2_reg: 1.2084e+02\n",
      "2020/09/10, 19:50:53, Iteration: 359000, Train Loss: 2.2663e-02, c1: 6.0721e-03, c2: 1.4044e-02, d1: 2.2103e-03, d2: 3.3056e-04, l1_reg: 4.6334e+02, l2_reg: 1.2102e+02\n",
      "2020/09/10, 19:51:05, Iteration: 360000, Train Loss: 2.2250e-02, c1: 5.9611e-03, c2: 1.3649e-02, d1: 2.5339e-03, d2: 9.9454e-05, l1_reg: 4.6358e+02, l2_reg: 1.2119e+02\n",
      "2020/09/10, 19:51:18, Iteration: 361000, Train Loss: 2.1572e-02, c1: 6.0485e-03, c2: 1.3791e-02, d1: 1.5703e-03, d2: 1.5639e-04, l1_reg: 4.6384e+02, l2_reg: 1.2136e+02\n",
      "2020/09/10, 19:51:31, Iteration: 362000, Train Loss: 2.4386e-02, c1: 6.4389e-03, c2: 1.4028e-02, d1: 3.7288e-03, d2: 1.8420e-04, l1_reg: 4.6408e+02, l2_reg: 1.2154e+02\n",
      "2020/09/10, 19:51:44, Iteration: 363000, Train Loss: 2.2474e-02, c1: 6.1333e-03, c2: 1.4179e-02, d1: 1.9260e-03, d2: 2.2979e-04, l1_reg: 4.6432e+02, l2_reg: 1.2170e+02\n",
      "2020/09/10, 19:51:57, Iteration: 364000, Train Loss: 2.5232e-02, c1: 5.9121e-03, c2: 1.3740e-02, d1: 5.4614e-03, d2: 1.1263e-04, l1_reg: 4.6455e+02, l2_reg: 1.2187e+02\n",
      "2020/09/10, 19:52:10, Iteration: 365000, Train Loss: 2.1438e-02, c1: 5.6843e-03, c2: 1.3439e-02, d1: 2.2067e-03, d2: 1.0296e-04, l1_reg: 4.6479e+02, l2_reg: 1.2203e+02\n",
      "2020/09/10, 19:52:22, Iteration: 366000, Train Loss: 2.2146e-02, c1: 5.8985e-03, c2: 1.4005e-02, d1: 1.9744e-03, d2: 2.6242e-04, l1_reg: 4.6501e+02, l2_reg: 1.2219e+02\n",
      "2020/09/10, 19:52:35, Iteration: 367000, Train Loss: 2.1357e-02, c1: 5.7879e-03, c2: 1.3061e-02, d1: 2.2693e-03, d2: 2.3218e-04, l1_reg: 4.6525e+02, l2_reg: 1.2236e+02\n",
      "2020/09/10, 19:52:48, Iteration: 368000, Train Loss: 2.0874e-02, c1: 5.7634e-03, c2: 1.3026e-02, d1: 1.9649e-03, d2: 1.1369e-04, l1_reg: 4.6546e+02, l2_reg: 1.2251e+02\n",
      "2020/09/10, 19:53:01, Iteration: 369000, Train Loss: 2.0754e-02, c1: 5.6679e-03, c2: 1.2963e-02, d1: 2.0179e-03, d2: 9.9990e-05, l1_reg: 4.6569e+02, l2_reg: 1.2268e+02\n",
      "2020/09/10, 19:53:14, Iteration: 370000, Train Loss: 2.3686e-02, c1: 6.2989e-03, c2: 1.3343e-02, d1: 3.9216e-03, d2: 1.1698e-04, l1_reg: 4.6590e+02, l2_reg: 1.2283e+02\n",
      "2020/09/10, 19:53:27, Iteration: 371000, Train Loss: 2.1418e-02, c1: 5.3419e-03, c2: 1.3160e-02, d1: 2.8173e-03, d2: 9.2989e-05, l1_reg: 4.6613e+02, l2_reg: 1.2299e+02\n",
      "2020/09/10, 19:53:39, Iteration: 372000, Train Loss: 2.2212e-02, c1: 5.7724e-03, c2: 1.3594e-02, d1: 2.6412e-03, d2: 1.9808e-04, l1_reg: 4.6634e+02, l2_reg: 1.2314e+02\n",
      "2020/09/10, 19:53:52, Iteration: 373000, Train Loss: 2.2298e-02, c1: 5.5380e-03, c2: 1.2982e-02, d1: 3.6271e-03, d2: 1.4520e-04, l1_reg: 4.6657e+02, l2_reg: 1.2330e+02\n",
      "2020/09/10, 19:54:05, Iteration: 374000, Train Loss: 2.1002e-02, c1: 5.2815e-03, c2: 1.1674e-02, d1: 3.9197e-03, d2: 1.2121e-04, l1_reg: 4.6679e+02, l2_reg: 1.2346e+02\n",
      "2020/09/10, 19:54:18, Iteration: 375000, Train Loss: 1.9960e-02, c1: 5.6274e-03, c2: 1.2200e-02, d1: 2.0282e-03, d2: 9.8184e-05, l1_reg: 4.6700e+02, l2_reg: 1.2361e+02\n",
      "2020/09/10, 19:54:31, Iteration: 376000, Train Loss: 2.2226e-02, c1: 5.7265e-03, c2: 1.4077e-02, d1: 2.0672e-03, d2: 3.4960e-04, l1_reg: 4.6723e+02, l2_reg: 1.2377e+02\n",
      "2020/09/10, 19:54:44, Iteration: 377000, Train Loss: 2.2758e-02, c1: 6.0978e-03, c2: 1.3373e-02, d1: 2.9960e-03, d2: 2.8539e-04, l1_reg: 4.6745e+02, l2_reg: 1.2393e+02\n",
      "2020/09/10, 19:54:57, Iteration: 378000, Train Loss: 2.0579e-02, c1: 5.2837e-03, c2: 1.2467e-02, d1: 2.7316e-03, d2: 9.0025e-05, l1_reg: 4.6765e+02, l2_reg: 1.2408e+02\n",
      "2020/09/10, 19:55:10, Iteration: 379000, Train Loss: 2.1353e-02, c1: 5.7804e-03, c2: 1.3370e-02, d1: 2.0933e-03, d2: 1.0383e-04, l1_reg: 4.6786e+02, l2_reg: 1.2423e+02\n",
      "2020/09/10, 19:55:23, Iteration: 380000, Train Loss: 2.1552e-02, c1: 5.7372e-03, c2: 1.2685e-02, d1: 2.9881e-03, d2: 1.3594e-04, l1_reg: 4.6807e+02, l2_reg: 1.2438e+02\n",
      "2020/09/10, 19:55:35, Iteration: 381000, Train Loss: 2.0470e-02, c1: 5.3807e-03, c2: 1.1813e-02, d1: 3.1201e-03, d2: 1.5078e-04, l1_reg: 4.6827e+02, l2_reg: 1.2453e+02\n",
      "2020/09/10, 19:55:48, Iteration: 382000, Train Loss: 2.0062e-02, c1: 5.7560e-03, c2: 1.2499e-02, d1: 1.6560e-03, d2: 1.4601e-04, l1_reg: 4.6846e+02, l2_reg: 1.2467e+02\n",
      "2020/09/10, 19:56:01, Iteration: 383000, Train Loss: 2.3971e-02, c1: 6.0654e-03, c2: 1.3608e-02, d1: 4.1424e-03, d2: 1.4906e-04, l1_reg: 4.6866e+02, l2_reg: 1.2482e+02\n",
      "2020/09/10, 19:56:14, Iteration: 384000, Train Loss: 2.1088e-02, c1: 5.4317e-03, c2: 1.2525e-02, d1: 2.9746e-03, d2: 1.5091e-04, l1_reg: 4.6887e+02, l2_reg: 1.2496e+02\n",
      "2020/09/10, 19:56:27, Iteration: 385000, Train Loss: 1.9275e-02, c1: 5.3669e-03, c2: 1.1513e-02, d1: 2.2017e-03, d2: 1.8724e-04, l1_reg: 4.6907e+02, l2_reg: 1.2511e+02\n",
      "2020/09/10, 19:56:39, Iteration: 386000, Train Loss: 2.0257e-02, c1: 5.8445e-03, c2: 1.1871e-02, d1: 2.3374e-03, d2: 1.9770e-04, l1_reg: 4.6926e+02, l2_reg: 1.2525e+02\n",
      "2020/09/10, 19:56:52, Iteration: 387000, Train Loss: 1.8668e-02, c1: 4.9802e-03, c2: 1.1139e-02, d1: 2.4441e-03, d2: 9.9104e-05, l1_reg: 4.6944e+02, l2_reg: 1.2538e+02\n",
      "2020/09/10, 19:57:05, Iteration: 388000, Train Loss: 2.0848e-02, c1: 5.7450e-03, c2: 1.3322e-02, d1: 1.5669e-03, d2: 2.0811e-04, l1_reg: 4.6965e+02, l2_reg: 1.2553e+02\n",
      "2020/09/10, 19:57:18, Iteration: 389000, Train Loss: 1.8082e-02, c1: 4.5942e-03, c2: 1.1764e-02, d1: 1.6017e-03, d2: 1.1609e-04, l1_reg: 4.6983e+02, l2_reg: 1.2566e+02\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 19:57:31, Iteration: 390000, Train Loss: 1.9655e-02, c1: 5.8063e-03, c2: 1.2294e-02, d1: 1.4156e-03, d2: 1.3354e-04, l1_reg: 4.7001e+02, l2_reg: 1.2580e+02\n",
      "2020/09/10, 19:57:44, Iteration: 391000, Train Loss: 1.9168e-02, c1: 4.8211e-03, c2: 1.0677e-02, d1: 3.5180e-03, d2: 1.4556e-04, l1_reg: 4.7021e+02, l2_reg: 1.2594e+02\n",
      "2020/09/10, 19:57:56, Iteration: 392000, Train Loss: 2.1413e-02, c1: 5.2686e-03, c2: 1.1864e-02, d1: 4.0770e-03, d2: 1.9761e-04, l1_reg: 4.7040e+02, l2_reg: 1.2607e+02\n",
      "2020/09/10, 19:58:09, Iteration: 393000, Train Loss: 2.1109e-02, c1: 5.3076e-03, c2: 1.2698e-02, d1: 2.9722e-03, d2: 1.2485e-04, l1_reg: 4.7057e+02, l2_reg: 1.2620e+02\n",
      "2020/09/10, 19:58:22, Iteration: 394000, Train Loss: 2.0858e-02, c1: 5.2298e-03, c2: 1.2963e-02, d1: 2.5331e-03, d2: 1.2663e-04, l1_reg: 4.7075e+02, l2_reg: 1.2633e+02\n",
      "2020/09/10, 19:58:35, Iteration: 395000, Train Loss: 2.3227e-02, c1: 5.1954e-03, c2: 1.3180e-02, d1: 4.6597e-03, d2: 1.8576e-04, l1_reg: 4.7093e+02, l2_reg: 1.2647e+02\n",
      "2020/09/10, 19:58:48, Iteration: 396000, Train Loss: 1.8977e-02, c1: 5.4614e-03, c2: 1.2061e-02, d1: 1.3637e-03, d2: 8.4493e-05, l1_reg: 4.7110e+02, l2_reg: 1.2659e+02\n",
      "2020/09/10, 19:59:01, Iteration: 397000, Train Loss: 1.9036e-02, c1: 5.1180e-03, c2: 1.1767e-02, d1: 2.0116e-03, d2: 1.3284e-04, l1_reg: 4.7128e+02, l2_reg: 1.2672e+02\n",
      "2020/09/10, 19:59:14, Iteration: 398000, Train Loss: 2.0415e-02, c1: 5.3730e-03, c2: 1.2196e-02, d1: 2.7418e-03, d2: 9.7841e-05, l1_reg: 4.7145e+02, l2_reg: 1.2685e+02\n",
      "2020/09/10, 19:59:26, Iteration: 399000, Train Loss: 2.1395e-02, c1: 5.5503e-03, c2: 1.2704e-02, d1: 3.0316e-03, d2: 1.0321e-04, l1_reg: 4.7162e+02, l2_reg: 1.2697e+02\n",
      "2020/09/10, 19:59:39, Iteration: 400000, Train Loss: 1.8769e-02, c1: 4.9478e-03, c2: 1.1470e-02, d1: 2.2614e-03, d2: 8.3754e-05, l1_reg: 4.7179e+02, l2_reg: 1.2710e+02\n",
      "2020/09/10, 19:59:52, Iteration: 401000, Train Loss: 1.7802e-02, c1: 5.1427e-03, c2: 1.0858e-02, d1: 1.5513e-03, d2: 2.4396e-04, l1_reg: 4.7196e+02, l2_reg: 1.2722e+02\n",
      "2020/09/10, 20:00:05, Iteration: 402000, Train Loss: 1.9102e-02, c1: 5.3286e-03, c2: 1.2102e-02, d1: 1.5027e-03, d2: 1.6256e-04, l1_reg: 4.7213e+02, l2_reg: 1.2734e+02\n",
      "2020/09/10, 20:00:18, Iteration: 403000, Train Loss: 1.9402e-02, c1: 5.3185e-03, c2: 1.0653e-02, d1: 3.3077e-03, d2: 1.1617e-04, l1_reg: 4.7231e+02, l2_reg: 1.2747e+02\n",
      "2020/09/10, 20:00:31, Iteration: 404000, Train Loss: 1.8959e-02, c1: 4.9147e-03, c2: 1.1544e-02, d1: 2.3776e-03, d2: 1.1710e-04, l1_reg: 4.7248e+02, l2_reg: 1.2760e+02\n",
      "2020/09/10, 20:00:44, Iteration: 405000, Train Loss: 1.7933e-02, c1: 4.7272e-03, c2: 1.0557e-02, d1: 2.4130e-03, d2: 2.2953e-04, l1_reg: 4.7264e+02, l2_reg: 1.2771e+02\n",
      "2020/09/10, 20:00:56, Iteration: 406000, Train Loss: 1.9552e-02, c1: 5.2776e-03, c2: 1.1848e-02, d1: 2.2545e-03, d2: 1.6602e-04, l1_reg: 4.7281e+02, l2_reg: 1.2784e+02\n",
      "2020/09/10, 20:01:09, Iteration: 407000, Train Loss: 2.1705e-02, c1: 5.7615e-03, c2: 1.3521e-02, d1: 2.3140e-03, d2: 1.0254e-04, l1_reg: 4.7296e+02, l2_reg: 1.2795e+02\n",
      "2020/09/10, 20:01:22, Iteration: 408000, Train Loss: 2.0124e-02, c1: 5.2768e-03, c2: 1.1843e-02, d1: 2.8374e-03, d2: 1.6062e-04, l1_reg: 4.7313e+02, l2_reg: 1.2807e+02\n",
      "2020/09/10, 20:01:35, Iteration: 409000, Train Loss: 1.8771e-02, c1: 5.1074e-03, c2: 1.0901e-02, d1: 2.5243e-03, d2: 2.3148e-04, l1_reg: 4.7327e+02, l2_reg: 1.2819e+02\n",
      "2020/09/10, 20:01:48, Iteration: 410000, Train Loss: 1.8426e-02, c1: 4.7570e-03, c2: 9.8432e-03, d1: 3.5288e-03, d2: 2.9100e-04, l1_reg: 4.7342e+02, l2_reg: 1.2830e+02\n",
      "2020/09/10, 20:02:01, Iteration: 411000, Train Loss: 1.8188e-02, c1: 4.9887e-03, c2: 1.1384e-02, d1: 1.5563e-03, d2: 2.5300e-04, l1_reg: 4.7358e+02, l2_reg: 1.2841e+02\n",
      "2020/09/10, 20:02:13, Iteration: 412000, Train Loss: 1.9862e-02, c1: 5.1130e-03, c2: 1.1531e-02, d1: 3.0657e-03, d2: 1.4650e-04, l1_reg: 4.7372e+02, l2_reg: 1.2852e+02\n",
      "2020/09/10, 20:02:26, Iteration: 413000, Train Loss: 2.0191e-02, c1: 4.9298e-03, c2: 1.1427e-02, d1: 3.6928e-03, d2: 1.3598e-04, l1_reg: 4.7388e+02, l2_reg: 1.2864e+02\n",
      "2020/09/10, 20:02:39, Iteration: 414000, Train Loss: 1.7225e-02, c1: 4.7255e-03, c2: 9.9424e-03, d1: 2.3516e-03, d2: 1.9914e-04, l1_reg: 4.7403e+02, l2_reg: 1.2875e+02\n",
      "2020/09/10, 20:02:52, Iteration: 415000, Train Loss: 1.8481e-02, c1: 5.2734e-03, c2: 1.0881e-02, d1: 2.1597e-03, d2: 1.6135e-04, l1_reg: 4.7417e+02, l2_reg: 1.2885e+02\n",
      "2020/09/10, 20:03:05, Iteration: 416000, Train Loss: 1.8791e-02, c1: 4.8190e-03, c2: 1.2162e-02, d1: 1.5615e-03, d2: 2.4249e-04, l1_reg: 4.7433e+02, l2_reg: 1.2897e+02\n",
      "2020/09/10, 20:03:18, Iteration: 417000, Train Loss: 1.9361e-02, c1: 5.2433e-03, c2: 1.1594e-02, d1: 2.3987e-03, d2: 1.1902e-04, l1_reg: 4.7447e+02, l2_reg: 1.2908e+02\n",
      "2020/09/10, 20:03:30, Iteration: 418000, Train Loss: 1.7902e-02, c1: 4.9949e-03, c2: 1.0624e-02, d1: 2.0029e-03, d2: 2.7373e-04, l1_reg: 4.7462e+02, l2_reg: 1.2919e+02\n",
      "2020/09/10, 20:03:43, Iteration: 419000, Train Loss: 1.9761e-02, c1: 5.0806e-03, c2: 1.1375e-02, d1: 3.0202e-03, d2: 2.7897e-04, l1_reg: 4.7476e+02, l2_reg: 1.2929e+02\n",
      "2020/09/10, 20:03:56, Iteration: 420000, Train Loss: 1.9853e-02, c1: 5.1754e-03, c2: 1.0169e-02, d1: 4.3786e-03, d2: 1.2401e-04, l1_reg: 4.7491e+02, l2_reg: 1.2940e+02\n",
      "2020/09/10, 20:04:09, Iteration: 421000, Train Loss: 1.8892e-02, c1: 4.6552e-03, c2: 1.2191e-02, d1: 1.9073e-03, d2: 1.3269e-04, l1_reg: 4.7506e+02, l2_reg: 1.2951e+02\n",
      "2020/09/10, 20:04:22, Iteration: 422000, Train Loss: 1.8336e-02, c1: 4.8302e-03, c2: 1.0520e-02, d1: 2.8344e-03, d2: 1.4500e-04, l1_reg: 4.7521e+02, l2_reg: 1.2962e+02\n",
      "2020/09/10, 20:04:34, Iteration: 423000, Train Loss: 1.6737e-02, c1: 4.7833e-03, c2: 1.0231e-02, d1: 1.5095e-03, d2: 2.0713e-04, l1_reg: 4.7535e+02, l2_reg: 1.2972e+02\n",
      "2020/09/10, 20:04:47, Iteration: 424000, Train Loss: 1.7172e-02, c1: 4.5853e-03, c2: 1.0382e-02, d1: 2.0819e-03, d2: 1.1714e-04, l1_reg: 4.7549e+02, l2_reg: 1.2983e+02\n",
      "2020/09/10, 20:05:00, Iteration: 425000, Train Loss: 1.7422e-02, c1: 4.9785e-03, c2: 1.0526e-02, d1: 1.8124e-03, d2: 9.9740e-05, l1_reg: 4.7563e+02, l2_reg: 1.2993e+02\n",
      "2020/09/10, 20:05:13, Iteration: 426000, Train Loss: 1.8759e-02, c1: 4.5897e-03, c2: 1.0965e-02, d1: 3.0364e-03, d2: 1.6203e-04, l1_reg: 4.7577e+02, l2_reg: 1.3003e+02\n",
      "2020/09/10, 20:05:26, Iteration: 427000, Train Loss: 1.9409e-02, c1: 4.5979e-03, c2: 1.0232e-02, d1: 4.4330e-03, d2: 1.4009e-04, l1_reg: 4.7591e+02, l2_reg: 1.3014e+02\n",
      "2020/09/10, 20:05:39, Iteration: 428000, Train Loss: 2.1793e-02, c1: 5.1807e-03, c2: 1.1511e-02, d1: 4.9909e-03, d2: 1.0453e-04, l1_reg: 4.7604e+02, l2_reg: 1.3024e+02\n",
      "2020/09/10, 20:05:52, Iteration: 429000, Train Loss: 1.8076e-02, c1: 4.9414e-03, c2: 1.1174e-02, d1: 1.7676e-03, d2: 1.8719e-04, l1_reg: 4.7619e+02, l2_reg: 1.3034e+02\n",
      "2020/09/10, 20:06:05, Iteration: 430000, Train Loss: 1.7786e-02, c1: 4.3244e-03, c2: 1.1122e-02, d1: 2.2253e-03, d2: 1.0825e-04, l1_reg: 4.7633e+02, l2_reg: 1.3045e+02\n",
      "2020/09/10, 20:06:17, Iteration: 431000, Train Loss: 2.2752e-02, c1: 5.1046e-03, c2: 1.1739e-02, d1: 5.8019e-03, d2: 9.9776e-05, l1_reg: 4.7646e+02, l2_reg: 1.3054e+02\n",
      "2020/09/10, 20:06:30, Iteration: 432000, Train Loss: 1.7313e-02, c1: 4.6235e-03, c2: 1.0858e-02, d1: 1.6631e-03, d2: 1.6315e-04, l1_reg: 4.7660e+02, l2_reg: 1.3065e+02\n",
      "2020/09/10, 20:06:43, Iteration: 433000, Train Loss: 2.0132e-02, c1: 4.7082e-03, c2: 1.2121e-02, d1: 3.1710e-03, d2: 1.2554e-04, l1_reg: 4.7672e+02, l2_reg: 1.3074e+02\n",
      "2020/09/10, 20:06:56, Iteration: 434000, Train Loss: 1.8094e-02, c1: 4.5962e-03, c2: 1.0952e-02, d1: 2.4275e-03, d2: 1.1182e-04, l1_reg: 4.7686e+02, l2_reg: 1.3085e+02\n",
      "2020/09/10, 20:07:09, Iteration: 435000, Train Loss: 2.0344e-02, c1: 4.7187e-03, c2: 1.1532e-02, d1: 3.9743e-03, d2: 1.1319e-04, l1_reg: 4.7700e+02, l2_reg: 1.3095e+02\n",
      "2020/09/10, 20:07:22, Iteration: 436000, Train Loss: 1.7075e-02, c1: 4.7858e-03, c2: 1.0398e-02, d1: 1.7073e-03, d2: 1.7779e-04, l1_reg: 4.7714e+02, l2_reg: 1.3105e+02\n",
      "2020/09/10, 20:07:35, Iteration: 437000, Train Loss: 1.7737e-02, c1: 5.0161e-03, c2: 1.1182e-02, d1: 1.3925e-03, d2: 1.3989e-04, l1_reg: 4.7726e+02, l2_reg: 1.3114e+02\n",
      "2020/09/10, 20:07:47, Iteration: 438000, Train Loss: 1.7853e-02, c1: 4.6658e-03, c2: 1.0188e-02, d1: 2.8501e-03, d2: 1.4336e-04, l1_reg: 4.7740e+02, l2_reg: 1.3124e+02\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2020/09/10, 20:08:00, Iteration: 439000, Train Loss: 1.7914e-02, c1: 4.5885e-03, c2: 1.0268e-02, d1: 2.9567e-03, d2: 9.5284e-05, l1_reg: 4.7754e+02, l2_reg: 1.3134e+02\n",
      "2020/09/10, 20:08:13, Iteration: 440000, Train Loss: 1.7485e-02, c1: 4.7353e-03, c2: 1.0314e-02, d1: 2.2671e-03, d2: 1.6237e-04, l1_reg: 4.7767e+02, l2_reg: 1.3144e+02\n"
     ]
    }
   ],
   "source": [
    "config.weights = {\n",
    "\t\"c1\": 1.0,\n",
    "\t\"c2\": 1.0,\n",
    "\t\"d1\": 1.0,\n",
    "\t\"d2\": 1.0,\n",
    "\t\"l1\": 1e-8,\n",
    "\t\"l2\": 1e-8,\n",
    "}\n",
    "config.iterations = 200000\n",
    "config.print_every = 1000\n",
    "config.save_every = 100000\n",
    "config.lr = 1e-4\n",
    "\n",
    "key, *subkeys = random.split(config.key, 3)\n",
    "params = init_siren_params(subkeys[0], config.layers, config.c0, config.w0)\n",
    "\n",
    "datasets = generate_dataset(config.n_data[\"i\"], config.n_data[\"cx\"], config.n_data[\"ct\"], config.n_data[\"quad\"])\n",
    "batch_fn, evaluate_batch_fn = generate_batch_fn(subkeys[1], config.batch_size, *datasets, config.weights)\n",
    "\n",
    "config.iterations = 200000\n",
    "agent.train(config.iterations, batch_fn, evaluate_batch_fn, config.print_every, config.save_every, config.loss_names, config.log_file)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from scipy.io import loadmat\n",
    "from jaxmeta.data import tensor_grid\n",
    "from jaxmeta.loss import rmse\n",
    "import numpy as np\n",
    "\n",
    "data_true = loadmat(\"snapshots_epsilon_1e-4.mat\")\n",
    "x_test, t_test, rho_true = data_true[\"x\"], data_true[\"t\"].T, data_true[\"rhos\"]\n",
    "xt_tests = [tensor_grid([x_test, ti]) for ti in t_test]\n",
    "\n",
    "from loss import quadrature\n",
    "params_ = agent.params\n",
    "quad = datasets[2]\n",
    "rho_pred = [quadrature(params_, xt, quad.nodes, quad.weights)[0, :] for xt in xt_tests]\n",
    "\n",
    "errors = np.zeros(len(t_test))\n",
    "for i in range(len(t_test)):\n",
    "\terrors[i] = rmse(rho_pred[i], rho_true[:, i:i+1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/javascript": [
       "/* Put everything inside the global mpl namespace */\n",
       "/* global mpl */\n",
       "window.mpl = {};\n",
       "\n",
       "mpl.get_websocket_type = function () {\n",
       "    if (typeof WebSocket !== 'undefined') {\n",
       "        return WebSocket;\n",
       "    } else if (typeof MozWebSocket !== 'undefined') {\n",
       "        return MozWebSocket;\n",
       "    } else {\n",
       "        alert(\n",
       "            'Your browser does not have WebSocket support. ' +\n",
       "                'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
       "                'Firefox 4 and 5 are also supported but you ' +\n",
       "                'have to enable WebSockets in about:config.'\n",
       "        );\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
       "    this.id = figure_id;\n",
       "\n",
       "    this.ws = websocket;\n",
       "\n",
       "    this.supports_binary = this.ws.binaryType !== undefined;\n",
       "\n",
       "    if (!this.supports_binary) {\n",
       "        var warnings = document.getElementById('mpl-warnings');\n",
       "        if (warnings) {\n",
       "            warnings.style.display = 'block';\n",
       "            warnings.textContent =\n",
       "                'This browser does not support binary websocket messages. ' +\n",
       "                'Performance may be slow.';\n",
       "        }\n",
       "    }\n",
       "\n",
       "    this.imageObj = new Image();\n",
       "\n",
       "    this.context = undefined;\n",
       "    this.message = undefined;\n",
       "    this.canvas = undefined;\n",
       "    this.rubberband_canvas = undefined;\n",
       "    this.rubberband_context = undefined;\n",
       "    this.format_dropdown = undefined;\n",
       "\n",
       "    this.image_mode = 'full';\n",
       "\n",
       "    this.root = document.createElement('div');\n",
       "    this.root.setAttribute('style', 'display: inline-block');\n",
       "    this._root_extra_style(this.root);\n",
       "\n",
       "    parent_element.appendChild(this.root);\n",
       "\n",
       "    this._init_header(this);\n",
       "    this._init_canvas(this);\n",
       "    this._init_toolbar(this);\n",
       "\n",
       "    var fig = this;\n",
       "\n",
       "    this.waiting = false;\n",
       "\n",
       "    this.ws.onopen = function () {\n",
       "        fig.send_message('supports_binary', { value: fig.supports_binary });\n",
       "        fig.send_message('send_image_mode', {});\n",
       "        if (mpl.ratio !== 1) {\n",
       "            fig.send_message('set_dpi_ratio', { dpi_ratio: mpl.ratio });\n",
       "        }\n",
       "        fig.send_message('refresh', {});\n",
       "    };\n",
       "\n",
       "    this.imageObj.onload = function () {\n",
       "        if (fig.image_mode === 'full') {\n",
       "            // Full images could contain transparency (where diff images\n",
       "            // almost always do), so we need to clear the canvas so that\n",
       "            // there is no ghosting.\n",
       "            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
       "        }\n",
       "        fig.context.drawImage(fig.imageObj, 0, 0);\n",
       "    };\n",
       "\n",
       "    this.imageObj.onunload = function () {\n",
       "        fig.ws.close();\n",
       "    };\n",
       "\n",
       "    this.ws.onmessage = this._make_on_message_function(this);\n",
       "\n",
       "    this.ondownload = ondownload;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_header = function () {\n",
       "    var titlebar = document.createElement('div');\n",
       "    titlebar.classList =\n",
       "        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
       "    var titletext = document.createElement('div');\n",
       "    titletext.classList = 'ui-dialog-title';\n",
       "    titletext.setAttribute(\n",
       "        'style',\n",
       "        'width: 100%; text-align: center; padding: 3px;'\n",
       "    );\n",
       "    titlebar.appendChild(titletext);\n",
       "    this.root.appendChild(titlebar);\n",
       "    this.header = titletext;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._init_canvas = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var canvas_div = (this.canvas_div = document.createElement('div'));\n",
       "    canvas_div.setAttribute(\n",
       "        'style',\n",
       "        'border: 1px solid #ddd;' +\n",
       "            'box-sizing: content-box;' +\n",
       "            'clear: both;' +\n",
       "            'min-height: 1px;' +\n",
       "            'min-width: 1px;' +\n",
       "            'outline: 0;' +\n",
       "            'overflow: hidden;' +\n",
       "            'position: relative;' +\n",
       "            'resize: both;'\n",
       "    );\n",
       "\n",
       "    function on_keyboard_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.key_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    canvas_div.addEventListener(\n",
       "        'keydown',\n",
       "        on_keyboard_event_closure('key_press')\n",
       "    );\n",
       "    canvas_div.addEventListener(\n",
       "        'keyup',\n",
       "        on_keyboard_event_closure('key_release')\n",
       "    );\n",
       "\n",
       "    this._canvas_extra_style(canvas_div);\n",
       "    this.root.appendChild(canvas_div);\n",
       "\n",
       "    var canvas = (this.canvas = document.createElement('canvas'));\n",
       "    canvas.classList.add('mpl-canvas');\n",
       "    canvas.setAttribute('style', 'box-sizing: content-box;');\n",
       "\n",
       "    this.context = canvas.getContext('2d');\n",
       "\n",
       "    var backingStore =\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        this.context.webkitBackingStorePixelRatio ||\n",
       "        this.context.mozBackingStorePixelRatio ||\n",
       "        this.context.msBackingStorePixelRatio ||\n",
       "        this.context.oBackingStorePixelRatio ||\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        1;\n",
       "\n",
       "    mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
       "\n",
       "    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
       "        'canvas'\n",
       "    ));\n",
       "    rubberband_canvas.setAttribute(\n",
       "        'style',\n",
       "        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n",
       "    );\n",
       "\n",
       "    var resizeObserver = new ResizeObserver(function (entries) {\n",
       "        var nentries = entries.length;\n",
       "        for (var i = 0; i < nentries; i++) {\n",
       "            var entry = entries[i];\n",
       "            var width, height;\n",
       "            if (entry.contentBoxSize) {\n",
       "                width = entry.contentBoxSize.inlineSize;\n",
       "                height = entry.contentBoxSize.blockSize;\n",
       "            } else {\n",
       "                width = entry.contentRect.width;\n",
       "                height = entry.contentRect.height;\n",
       "            }\n",
       "\n",
       "            // Keep the size of the canvas and rubber band canvas in sync with\n",
       "            // the canvas container.\n",
       "            canvas.setAttribute('width', width * mpl.ratio);\n",
       "            canvas.setAttribute('height', height * mpl.ratio);\n",
       "            canvas.setAttribute(\n",
       "                'style',\n",
       "                'width: ' + width + 'px; height: ' + height + 'px;'\n",
       "            );\n",
       "\n",
       "            rubberband_canvas.setAttribute('width', width);\n",
       "            rubberband_canvas.setAttribute('height', height);\n",
       "\n",
       "            // And update the size in Python. We ignore the initial 0/0 size\n",
       "            // that occurs as the element is placed into the DOM, which should\n",
       "            // otherwise not happen due to the minimum size styling.\n",
       "            if (width != 0 && height != 0) {\n",
       "                fig.request_resize(width, height);\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "    resizeObserver.observe(canvas_div);\n",
       "\n",
       "    function on_mouse_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.mouse_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousedown',\n",
       "        on_mouse_event_closure('button_press')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseup',\n",
       "        on_mouse_event_closure('button_release')\n",
       "    );\n",
       "    // Throttle sequential mouse events to 1 every 20ms.\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousemove',\n",
       "        on_mouse_event_closure('motion_notify')\n",
       "    );\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseenter',\n",
       "        on_mouse_event_closure('figure_enter')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseleave',\n",
       "        on_mouse_event_closure('figure_leave')\n",
       "    );\n",
       "\n",
       "    canvas_div.addEventListener('wheel', function (event) {\n",
       "        if (event.deltaY < 0) {\n",
       "            event.step = 1;\n",
       "        } else {\n",
       "            event.step = -1;\n",
       "        }\n",
       "        on_mouse_event_closure('scroll')(event);\n",
       "    });\n",
       "\n",
       "    canvas_div.appendChild(canvas);\n",
       "    canvas_div.appendChild(rubberband_canvas);\n",
       "\n",
       "    this.rubberband_context = rubberband_canvas.getContext('2d');\n",
       "    this.rubberband_context.strokeStyle = '#000000';\n",
       "\n",
       "    this._resize_canvas = function (width, height, forward) {\n",
       "        if (forward) {\n",
       "            canvas_div.style.width = width + 'px';\n",
       "            canvas_div.style.height = height + 'px';\n",
       "        }\n",
       "    };\n",
       "\n",
       "    // Disable right mouse context menu.\n",
       "    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n",
       "        return false;\n",
       "    });\n",
       "\n",
       "    function set_focus() {\n",
       "        canvas.focus();\n",
       "        canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    window.setTimeout(set_focus, 100);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'mpl-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'mpl-button-group';\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'mpl-button-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        var button = (fig.buttons[name] = document.createElement('button'));\n",
       "        button.classList = 'mpl-widget';\n",
       "        button.setAttribute('role', 'button');\n",
       "        button.setAttribute('aria-disabled', 'false');\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "\n",
       "        var icon_img = document.createElement('img');\n",
       "        icon_img.src = '_images/' + image + '.png';\n",
       "        icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
       "        icon_img.alt = tooltip;\n",
       "        button.appendChild(icon_img);\n",
       "\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    var fmt_picker = document.createElement('select');\n",
       "    fmt_picker.classList = 'mpl-widget';\n",
       "    toolbar.appendChild(fmt_picker);\n",
       "    this.format_dropdown = fmt_picker;\n",
       "\n",
       "    for (var ind in mpl.extensions) {\n",
       "        var fmt = mpl.extensions[ind];\n",
       "        var option = document.createElement('option');\n",
       "        option.selected = fmt === mpl.default_extension;\n",
       "        option.innerHTML = fmt;\n",
       "        fmt_picker.appendChild(option);\n",
       "    }\n",
       "\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
       "    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
       "    // which will in turn request a refresh of the image.\n",
       "    this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_message = function (type, properties) {\n",
       "    properties['type'] = type;\n",
       "    properties['figure_id'] = this.id;\n",
       "    this.ws.send(JSON.stringify(properties));\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_draw_message = function () {\n",
       "    if (!this.waiting) {\n",
       "        this.waiting = true;\n",
       "        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    var format_dropdown = fig.format_dropdown;\n",
       "    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
       "    fig.ondownload(fig, format);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
       "    var size = msg['size'];\n",
       "    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
       "        fig._resize_canvas(size[0], size[1], msg['forward']);\n",
       "        fig.send_message('refresh', {});\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
       "    var x0 = msg['x0'] / mpl.ratio;\n",
       "    var y0 = (fig.canvas.height - msg['y0']) / mpl.ratio;\n",
       "    var x1 = msg['x1'] / mpl.ratio;\n",
       "    var y1 = (fig.canvas.height - msg['y1']) / mpl.ratio;\n",
       "    x0 = Math.floor(x0) + 0.5;\n",
       "    y0 = Math.floor(y0) + 0.5;\n",
       "    x1 = Math.floor(x1) + 0.5;\n",
       "    y1 = Math.floor(y1) + 0.5;\n",
       "    var min_x = Math.min(x0, x1);\n",
       "    var min_y = Math.min(y0, y1);\n",
       "    var width = Math.abs(x1 - x0);\n",
       "    var height = Math.abs(y1 - y0);\n",
       "\n",
       "    fig.rubberband_context.clearRect(\n",
       "        0,\n",
       "        0,\n",
       "        fig.canvas.width / mpl.ratio,\n",
       "        fig.canvas.height / mpl.ratio\n",
       "    );\n",
       "\n",
       "    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
       "    // Updates the figure title.\n",
       "    fig.header.textContent = msg['label'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
       "    var cursor = msg['cursor'];\n",
       "    switch (cursor) {\n",
       "        case 0:\n",
       "            cursor = 'pointer';\n",
       "            break;\n",
       "        case 1:\n",
       "            cursor = 'default';\n",
       "            break;\n",
       "        case 2:\n",
       "            cursor = 'crosshair';\n",
       "            break;\n",
       "        case 3:\n",
       "            cursor = 'move';\n",
       "            break;\n",
       "    }\n",
       "    fig.rubberband_canvas.style.cursor = cursor;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_message = function (fig, msg) {\n",
       "    fig.message.textContent = msg['message'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
       "    // Request the server to send over a new figure.\n",
       "    fig.send_draw_message();\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
       "    fig.image_mode = msg['mode'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
       "    for (var key in msg) {\n",
       "        if (!(key in fig.buttons)) {\n",
       "            continue;\n",
       "        }\n",
       "        fig.buttons[key].disabled = !msg[key];\n",
       "        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
       "    if (msg['mode'] === 'PAN') {\n",
       "        fig.buttons['Pan'].classList.add('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    } else if (msg['mode'] === 'ZOOM') {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.add('active');\n",
       "    } else {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Called whenever the canvas gets updated.\n",
       "    this.send_message('ack', {});\n",
       "};\n",
       "\n",
       "// A function to construct a web socket function for onmessage handling.\n",
       "// Called in the figure constructor.\n",
       "mpl.figure.prototype._make_on_message_function = function (fig) {\n",
       "    return function socket_on_message(evt) {\n",
       "        if (evt.data instanceof Blob) {\n",
       "            /* FIXME: We get \"Resource interpreted as Image but\n",
       "             * transferred with MIME type text/plain:\" errors on\n",
       "             * Chrome.  But how to set the MIME type?  It doesn't seem\n",
       "             * to be part of the websocket stream */\n",
       "            evt.data.type = 'image/png';\n",
       "\n",
       "            /* Free the memory for the previous frames */\n",
       "            if (fig.imageObj.src) {\n",
       "                (window.URL || window.webkitURL).revokeObjectURL(\n",
       "                    fig.imageObj.src\n",
       "                );\n",
       "            }\n",
       "\n",
       "            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
       "                evt.data\n",
       "            );\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        } else if (\n",
       "            typeof evt.data === 'string' &&\n",
       "            evt.data.slice(0, 21) === 'data:image/png;base64'\n",
       "        ) {\n",
       "            fig.imageObj.src = evt.data;\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        var msg = JSON.parse(evt.data);\n",
       "        var msg_type = msg['type'];\n",
       "\n",
       "        // Call the  \"handle_{type}\" callback, which takes\n",
       "        // the figure and JSON message as its only arguments.\n",
       "        try {\n",
       "            var callback = fig['handle_' + msg_type];\n",
       "        } catch (e) {\n",
       "            console.log(\n",
       "                \"No handler for the '\" + msg_type + \"' message type: \",\n",
       "                msg\n",
       "            );\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        if (callback) {\n",
       "            try {\n",
       "                // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
       "                callback(fig, msg);\n",
       "            } catch (e) {\n",
       "                console.log(\n",
       "                    \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
       "                    e,\n",
       "                    e.stack,\n",
       "                    msg\n",
       "                );\n",
       "            }\n",
       "        }\n",
       "    };\n",
       "};\n",
       "\n",
       "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
       "mpl.findpos = function (e) {\n",
       "    //this section is from http://www.quirksmode.org/js/events_properties.html\n",
       "    var targ;\n",
       "    if (!e) {\n",
       "        e = window.event;\n",
       "    }\n",
       "    if (e.target) {\n",
       "        targ = e.target;\n",
       "    } else if (e.srcElement) {\n",
       "        targ = e.srcElement;\n",
       "    }\n",
       "    if (targ.nodeType === 3) {\n",
       "        // defeat Safari bug\n",
       "        targ = targ.parentNode;\n",
       "    }\n",
       "\n",
       "    // pageX,Y are the mouse positions relative to the document\n",
       "    var boundingRect = targ.getBoundingClientRect();\n",
       "    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n",
       "    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n",
       "\n",
       "    return { x: x, y: y };\n",
       "};\n",
       "\n",
       "/*\n",
       " * return a copy of an object with only non-object keys\n",
       " * we need this to avoid circular references\n",
       " * http://stackoverflow.com/a/24161582/3208463\n",
       " */\n",
       "function simpleKeys(original) {\n",
       "    return Object.keys(original).reduce(function (obj, key) {\n",
       "        if (typeof original[key] !== 'object') {\n",
       "            obj[key] = original[key];\n",
       "        }\n",
       "        return obj;\n",
       "    }, {});\n",
       "}\n",
       "\n",
       "mpl.figure.prototype.mouse_event = function (event, name) {\n",
       "    var canvas_pos = mpl.findpos(event);\n",
       "\n",
       "    if (name === 'button_press') {\n",
       "        this.canvas.focus();\n",
       "        this.canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    var x = canvas_pos.x * mpl.ratio;\n",
       "    var y = canvas_pos.y * mpl.ratio;\n",
       "\n",
       "    this.send_message(name, {\n",
       "        x: x,\n",
       "        y: y,\n",
       "        button: event.button,\n",
       "        step: event.step,\n",
       "        guiEvent: simpleKeys(event),\n",
       "    });\n",
       "\n",
       "    /* This prevents the web browser from automatically changing to\n",
       "     * the text insertion cursor when the button is pressed.  We want\n",
       "     * to control all of the cursor setting manually through the\n",
       "     * 'cursor' event from matplotlib */\n",
       "    event.preventDefault();\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
       "    // Handle any extra behaviour associated with a key event\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.key_event = function (event, name) {\n",
       "    // Prevent repeat events\n",
       "    if (name === 'key_press') {\n",
       "        if (event.which === this._key) {\n",
       "            return;\n",
       "        } else {\n",
       "            this._key = event.which;\n",
       "        }\n",
       "    }\n",
       "    if (name === 'key_release') {\n",
       "        this._key = null;\n",
       "    }\n",
       "\n",
       "    var value = '';\n",
       "    if (event.ctrlKey && event.which !== 17) {\n",
       "        value += 'ctrl+';\n",
       "    }\n",
       "    if (event.altKey && event.which !== 18) {\n",
       "        value += 'alt+';\n",
       "    }\n",
       "    if (event.shiftKey && event.which !== 16) {\n",
       "        value += 'shift+';\n",
       "    }\n",
       "\n",
       "    value += 'k';\n",
       "    value += event.which.toString();\n",
       "\n",
       "    this._key_event_extra(event, name);\n",
       "\n",
       "    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
       "    if (name === 'download') {\n",
       "        this.handle_save(this, null);\n",
       "    } else {\n",
       "        this.send_message('toolbar_button', { name: name });\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
       "    this.message.textContent = tooltip;\n",
       "};\n",
       "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
       "\n",
       "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
       "\n",
       "mpl.default_extension = \"png\";/* global mpl */\n",
       "\n",
       "var comm_websocket_adapter = function (comm) {\n",
       "    // Create a \"websocket\"-like object which calls the given IPython comm\n",
       "    // object with the appropriate methods. Currently this is a non binary\n",
       "    // socket, so there is still some room for performance tuning.\n",
       "    var ws = {};\n",
       "\n",
       "    ws.close = function () {\n",
       "        comm.close();\n",
       "    };\n",
       "    ws.send = function (m) {\n",
       "        //console.log('sending', m);\n",
       "        comm.send(m);\n",
       "    };\n",
       "    // Register the callback with on_msg.\n",
       "    comm.on_msg(function (msg) {\n",
       "        //console.log('receiving', msg['content']['data'], msg);\n",
       "        // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
       "        ws.onmessage(msg['content']['data']);\n",
       "    });\n",
       "    return ws;\n",
       "};\n",
       "\n",
       "mpl.mpl_figure_comm = function (comm, msg) {\n",
       "    // This is the function which gets called when the mpl process\n",
       "    // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
       "\n",
       "    var id = msg.content.data.id;\n",
       "    // Get hold of the div created by the display call when the Comm\n",
       "    // socket was opened in Python.\n",
       "    var element = document.getElementById(id);\n",
       "    var ws_proxy = comm_websocket_adapter(comm);\n",
       "\n",
       "    function ondownload(figure, _format) {\n",
       "        window.open(figure.canvas.toDataURL());\n",
       "    }\n",
       "\n",
       "    var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
       "\n",
       "    // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
       "    // web socket which is closed, not our websocket->open comm proxy.\n",
       "    ws_proxy.onopen();\n",
       "\n",
       "    fig.parent_element = element;\n",
       "    fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
       "    if (!fig.cell_info) {\n",
       "        console.error('Failed to find cell for figure', id, fig);\n",
       "        return;\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_close = function (fig, msg) {\n",
       "    var width = fig.canvas.width / mpl.ratio;\n",
       "    fig.root.removeEventListener('remove', this._remove_fig_handler);\n",
       "\n",
       "    // Update the output cell to use the data from the current canvas.\n",
       "    fig.push_to_output();\n",
       "    var dataURL = fig.canvas.toDataURL();\n",
       "    // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
       "    // the notebook keyboard shortcuts fail.\n",
       "    IPython.keyboard_manager.enable();\n",
       "    fig.parent_element.innerHTML =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "    fig.close_ws(fig, msg);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.close_ws = function (fig, msg) {\n",
       "    fig.send_message('closing', msg);\n",
       "    // fig.ws.close()\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
       "    // Turn the data on the canvas into data in the output cell.\n",
       "    var width = this.canvas.width / mpl.ratio;\n",
       "    var dataURL = this.canvas.toDataURL();\n",
       "    this.cell_info[1]['text/html'] =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Tell IPython that the notebook contents must change.\n",
       "    IPython.notebook.set_dirty(true);\n",
       "    this.send_message('ack', {});\n",
       "    var fig = this;\n",
       "    // Wait a second, then push the new image to the DOM so\n",
       "    // that it is saved nicely (might be nice to debounce this).\n",
       "    setTimeout(function () {\n",
       "        fig.push_to_output();\n",
       "    }, 1000);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'btn-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'btn-group';\n",
       "    var button;\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'btn-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        button = fig.buttons[name] = document.createElement('button');\n",
       "        button.classList = 'btn btn-default';\n",
       "        button.href = '#';\n",
       "        button.title = name;\n",
       "        button.innerHTML = '<i class=\"fa ' + image + ' fa-lg\"></i>';\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    // Add the status bar.\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message pull-right';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "\n",
       "    // Add the close button to the window.\n",
       "    var buttongrp = document.createElement('div');\n",
       "    buttongrp.classList = 'btn-group inline pull-right';\n",
       "    button = document.createElement('button');\n",
       "    button.classList = 'btn btn-mini btn-primary';\n",
       "    button.href = '#';\n",
       "    button.title = 'Stop Interaction';\n",
       "    button.innerHTML = '<i class=\"fa fa-power-off icon-remove icon-large\"></i>';\n",
       "    button.addEventListener('click', function (_evt) {\n",
       "        fig.handle_close(fig, {});\n",
       "    });\n",
       "    button.addEventListener(\n",
       "        'mouseover',\n",
       "        on_mouseover_closure('Stop Interaction')\n",
       "    );\n",
       "    buttongrp.appendChild(button);\n",
       "    var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
       "    titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._remove_fig_handler = function () {\n",
       "    this.close_ws(this, {});\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (el) {\n",
       "    el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
       "    el.addEventListener('remove', this._remove_fig_handler);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (el) {\n",
       "    // this is important to make the div 'focusable\n",
       "    el.setAttribute('tabindex', 0);\n",
       "    // reach out to IPython and tell the keyboard manager to turn it's self\n",
       "    // off when our div gets focus\n",
       "\n",
       "    // location in version 3\n",
       "    if (IPython.notebook.keyboard_manager) {\n",
       "        IPython.notebook.keyboard_manager.register_events(el);\n",
       "    } else {\n",
       "        // location in version 2\n",
       "        IPython.keyboard_manager.register_events(el);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
       "    var manager = IPython.notebook.keyboard_manager;\n",
       "    if (!manager) {\n",
       "        manager = IPython.keyboard_manager;\n",
       "    }\n",
       "\n",
       "    // Check for shift+enter\n",
       "    if (event.shiftKey && event.which === 13) {\n",
       "        this.canvas_div.blur();\n",
       "        // select the cell after this one\n",
       "        var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
       "        IPython.notebook.select(index + 1);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    fig.ondownload(fig, null);\n",
       "};\n",
       "\n",
       "mpl.find_output_cell = function (html_output) {\n",
       "    // Return the cell and output element which can be found *uniquely* in the notebook.\n",
       "    // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
       "    // IPython event is triggered only after the cells have been serialised, which for\n",
       "    // our purposes (turning an active figure into a static one), is too late.\n",
       "    var cells = IPython.notebook.get_cells();\n",
       "    var ncells = cells.length;\n",
       "    for (var i = 0; i < ncells; i++) {\n",
       "        var cell = cells[i];\n",
       "        if (cell.cell_type === 'code') {\n",
       "            for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
       "                var data = cell.output_area.outputs[j];\n",
       "                if (data.data) {\n",
       "                    // IPython >= 3 moved mimebundle to data attribute of output\n",
       "                    data = data.data;\n",
       "                }\n",
       "                if (data['text/html'] === html_output) {\n",
       "                    return [cell, data, j];\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "\n",
       "// Register the function which deals with the matplotlib target/channel.\n",
       "// The kernel may be null if the page has been refreshed.\n",
       "if (IPython.notebook.kernel !== null) {\n",
       "    IPython.notebook.kernel.comm_manager.register_target(\n",
       "        'matplotlib',\n",
       "        mpl.mpl_figure_comm\n",
       "    );\n",
       "}\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<img src=\"\" width=\"1499.6833333333334\">"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib notebook\n",
    "\n",
    "f, ax = plt.subplots(1, 3, figsize = (15, 5))\n",
    "\n",
    "\n",
    "ax[0].plot(x_test, rho_pred[-1], label = \"pred\")\n",
    "ax[0].plot(x_test, rho_true[:, -1], label = \"true\")\n",
    "ax[1].plot(t_test, errors, label = \"err\")\n",
    "\n",
    "ax[0].set_xlabel(\"x\")\n",
    "ax[0].set_ylabel(\"RMSE, rho\")\n",
    "ax[0].set_title(\"t = {:.2f}\".format(t_test[-1, 0]))\n",
    "ax[1].set_xlabel(\"t\")\n",
    "ax[1].set_ylabel(\"RMSE, rho\")\n",
    "ax[1].set_title(\"Error vs. Time\")\n",
    "\n",
    "ax[2].plot(x_test, rho_pred[0], label = \"pred\")\n",
    "ax[2].plot(x_test, rho_true[:, 0], label = \"true\")\n",
    "ax[2].set_xlabel(\"x\")\n",
    "ax[2].set_ylabel(\"RMSE, rho\")\n",
    "ax[2].set_title(\"t = {:.2f}\".format(t_test[0, 0]))\n",
    "\n",
    "for ax_ in ax:\n",
    "\tax_.legend()\n",
    "\tax_.grid()\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
